Basic Tags |
|
|
There are probably hundreds of HTML Tags like Tables, frames, images, lists, forms, and many more but the most important tags in HTML are tags that define headings, paragraphs and line breaks.
Headings
A heading in HTML is just what you might expect, a title or subtitle. There are six Headings tags. The largest heading is defined with <h1> and the smallest heading is defined with <h6>. Here are examples of 6 tags
This is heading 1
This is heading 2
This is heading 3
This is heading 4
This is heading 5
This is heading 6
Each heading has a line break before and after each heading display. When you place a heading tag, your web browser automatically places a line break in front of beginning tag and after ending tag.
Paragraphs
Paragraphs are defined with the <p> tag. <p> tag places a blank line above and below the text of the paragraph.
First paragraph of the HTML document. First paragraph of the HTML document. First paragraph of the HTML document. First paragraph of the HTML document. First paragraph of the HTML document. First paragraph of the HTML document.
This is second paragraph. This is second paragraph. This is second paragraph. This is second paragraph. This is second paragraph. This is second paragraph. This is second paragraph. This is second paragraph.
This is third paragraph. This is third paragraph. This is third paragraph. This is third paragraph. This is third paragraph. This is third paragraph. This is third paragraph.
Paragraph Alignments
You can align your paragraphs by using following attributes.
Left Align:
<p align="left">Paragraph is left Aligned </p>
Center Align:
<p align="center">Paragraph is center Aligned </p>
Right Align:
<p align="right">Paragraph is right Aligned </p>
Justified
<p align="justified">Paragraph is justified</p>
Line Breaks
<br> tag is used to break a line. It is used when you want to break link but don't want to start a new paragraph.
Example :
First Line.<br>
Second Line.<br>
You have no need to close <br> tag. It can be used at any place in your web document. You can also use
as alternate of <br /> tag.
<br> has no end tag. It breaks the rule for XML based XHTML so we often use <br /> tag.
|
|
|
|
|
|
|
|
|