Use Code Comments to Temporarily Remove Elements from an HTML5 Web Page
Edited by Grimm, Amanda, Eng, Anonymous
You are watching VisiHow. In this tutorial, we are going to explain to you how you can use code commenting to remove sections of code from an HTML5 web page so that they are not shown when the page is output.
- 13Review the code that has been commented out.Anyone reading this will note that this should not appear. Each code comment is an indicator to someone reading the code. It tells them what we intended to do, and what we were trying to do, or who we are and what we're doing. There are other ways to say who we are, but we will discuss those in later tutorials. This is the simple way to do it. "Heading 2" will no longer appear on our page. Let's check this in a browser.
- 23View the web page.Our "Heading 2" and "Para 2" are back, right where they were. Close the browser. This is important because if we're working with other people, or if we are working in the role of designer and are not actually filling in things, people might want to see things one at a time. Someone might want to see the page without images, or with images. It's very easy to go in and temporarily block pieces of code by commenting them out. When done, we won't have to rewrite the code, or copy and paste and save it elsewhere, which can be a big mess on a large website. This makes it nice and easy. We still have our small website. Let's put the formatting back.
- 29Now we're done this tutorial.It's that easy to comment out sections of a web page. It's a great way to do things. Plus, if you have something that's not working, you can remove it one item at a time until you find the one that isn't working, and then fix it. Add your comments and questions to the comments section. Let us know what else you want to know. This is all about HTML5 and helping you learn how to make your own HTML5 web pages from the ground up. Thanks for choosing VisiHow. Have a great day, and we will see you in our other tutorials.Advertisement
Video: Use Code Comments to Temporarily Remove Elements from an HTML5 Web Page
- If you have problems with any of these steps, ask a question for more help, or post in the comments section below.
Categories : Software
Recent edits by: Eng, Amanda, Grimm