Lesson 2 :- Using Headers, Comments and Paragraphs
(362 reads)
Using Headings
Headings are defined with the <h1> to <h6> tags. <h1> defines
the largest heading. <h6> defines the smallest heading.
<h1>This is a heading</h1>
<h2>This is a heading</h2>
<h3>This is a heading</h3>
<h4>This is a heading</h4>
<h5>This is a heading</h5>
<h6>This is a heading</h6>
In HTML an extra blank line is automatically added before and after a heading.
HTML Comments
The comment tag is used to insert a comment in the HTML source code. Comments
are ignored by the browser. You can use comments to explain your code, which
can help you when you edit the source code at a later date.
<!-- This is a comment -->
Note that you need an exclamation point after the opening bracket, but not
before the closing bracket.
Line Breaks
The <br> tag is used when you want to end a line, but don't want to start
a new paragraph. The <br> tag forces a line break wherever you place it.
<p>This <br> is a para<br>graph with line breaks</p>
The <br> tag is an empty tag. It has no closing tag.
Using Paragraphs
Paragraphs are defined with the <p> tag.
<p>This is a paragraph</p>
<p>This is another paragraph</p>
HTML automatically adds an extra blank line before and after a paragraph. |