html for beginers 03

HTML for Beginners 03 Spacing, Line brakes And Comments

HTML Headings

HTML headings are defined with the <h1> to <h6> tags.

<h1> defines the most important heading. <h6> defines the least important heading:

Example

<h1>This is heading 1</h1>
 <h2>This is heading 2</h2>
<h3>This is heading 3</h3>

HTML Paragraphs

HTML paragraphs are defined with the <p> tag:

Example

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

HTML <br> Tag

Example

A line break is marked up as follows:

This text contains<br>a line break.

Definition and Usage

The <br> tag inserts a single line break.

The <br> tag is an empty tag which means that it has no end tag.


HTML Comment Tags

You can add comments to your HTML source by using the following syntax:

<!-- Write your comments here -->

Notice that there is an exclamation point (!) in the opening tag, but not in the closing tag.

With comments you can place notifications and reminders in your HTML:

Example

<!-- This is a comment -->

<p>This is a paragraph.</p>
 
<!-- Remember to add more information here -->

Comments are also great for debugging HTML, because you can comment out HTML lines of code, one at a time, to search for errors:

Example

<!-- Do not display this at the moment
<img border="0" src="pic_mountain.jpg" alt="Mountain"> -->

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.