HTML Tutorial Example
Example
HTML Tags
HTML Basic
HTML Introduction
HTML Start
HTML Basic
HTML Elements
HTML Attributes
HTML Headings
HTML Paragraphs
HTML Formatting Elements
HTML Color Codes
HTML Font
HTML Links
HTML Style
HTML Text Links
HTML Entities
HTML Email
HTML Images
HTML Image Links
HTML Forms
HTML Tables
HTML Bgcolor
HTML Background
HTML Color Chart
HTML Frames
HTML Layouts
HTML Comments
HTML Meta
HTML Script
HTML Special Tags
HTML Body
HTML Div
HTML Formatting Tags
HTML Bold
HTML Italic
HTML Code
HTML Pre
HTML Superscript
HTML Subscript
HTML Strikethrough
HTML Forms
HTML Input Tags
HTML Text Fields
HTML Password
HTML Checkboxes
HTML Radio
HTML Textareas
HTML Upload
HTML Select
HTML Submit
HTML Reset
HTML Hidden Fields
HTML References
HTML Events
HTML Character Sets
HTML Symbols
HTML ASCII
A comment is a way for you as the web page developer to control what lines of code are to be ignored by the web browser.
There are three main reasons you may want your code to be ignored.
Use the last example place text inside your code and documents that the web browser will ignore. This is a great way to place little notes to yourself or to remind yourself what pieces of code are doing what.
<!-- Comment Here -->
As you can see comment syntax may be a little complicated, there is an opening and a closing much like tags.
Placing notes and reminders to yourself is a great way to remember your thoughts and to keep track elements embedded in your webpages. Also, your code may exist for many years, these notes to yourself are a great way to remember what was going on as you may not remember 5 or more years down the road.
All combinations of text placed within the comment tags will be ignored by the web browser, this includes any HTML tags, scripting language(s), etc.
As a web developer often times you may have many works in progress, or elements that aren't quite finished. In this case you may comment out an element until it is 100% ready for the site. Below we have commented out an input form element since we are not quite ready to receive input from our users.
<!-- <input type="text" size="12" /> -- Input Field -->
Now when we are ready to display that element, we can simply remove the comment tags and our browser will readily display the element.
Scripting languages such as Javascript and VBScript must be commented out as well. You will learn that once they are placed within the <script> tags, only then does the browser correctly execute the scripts.
<script>
<!--
document.write("Hello World!")
//-->
</script>
With this example we are jumping far ahead, just be sure you understand when to use comments and where to look for them. They are a very useful tool for any large project.

