Curriculum
Course: HTML Basic
Login

Curriculum

HTML Basic

HTML Introduction

0/1

HTML Editors

0/1

HTML Elements

0/1

HTML Attributes

0/1

HTML Headings

0/1

HTML Paragraphs

0/1

HTML Styles

0/1

HTML Formatting

0/1

HTML Quotation

0/1

HTML Comments

0/1

HTML Colors

0/1

HTML Favicon

0/1

HTML Page Title

0/1

HTML Block and Inline

0/1

HTML Iframes

0/1

HTML Java Script

0/1

HTML File Paths

0/1

HTML - The Head Element

0/1

HTML Style Guide

0/1

HTML Entities

0/1

HTML Symbols

0/1
Text lesson

HTML Comments

HTML comments are not visible in the browser, yet they serve to document your HTML source code.

HTML Comment Tag

Comments can be incorporated into your HTML code using the syntax below:

<!– Write your comments here –>

Note that there is an exclamation point (!) in the start tag, but not in the end tag.

Note: Comments are not rendered by the browser, yet they can aid in documenting your HTML source code.

Add Comments

Using comments, you can insert notifications and reminders within your HTML code.

Example

<!– write your comment here –>

<p>This is a paragraph.</p>

<!– your information here –>

Hide your Content

Comments can serve to conceal content, which can be useful for temporarily hiding it.

Example

<p>This is a paragraph.</p>

<!– <p>This is another paragraph </p> –> This paragraph will be hidden because the code is between <!– and the –>.

<p>This is a paragraph too.</p>

You can also conceal multiple lines. Anything enclosed between <!– and –> will be hidden from view.

Example

Hide section of Code:

<p>This is a paragraph.</p>
<!–
<p>Look at this cool image:</p>
<img border=”0″ src=”pic_trulli.jpg” alt=”Trulli”>
–>

<p>This is a paragraph too.</p>

In the above code the paragraph and the img tag are inside <!– and –> and will be hidden and wont display in the browser.

Click to Learn

Comments are also invaluable for debugging HTML, as you can selectively comment out lines of HTML code one by one to identify errors.

Hide Inline Content

Comments can be utilized to conceal sections within the HTML code.

Example

Hide a part of a paragraph:

<p>This <!– great text –> is a paragraph.</p>