Chapter 4: HTML Headings, Rules & Comments
» HTML Headings
One
of the important things is to use heading to show the document structure.
Headings are defined, from largest to smallest, with the <h1> to
<h6> tags. You can use also uppercase elements like <H1> or
<H2> ...etc.
EXAMPLE:
<h1>Heading 1</h1>
<H2>Heading 2</H2>
<H3>Heading 3</H3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
» ATTENTION:
After
typing this code your browser will add automatically line after and before
headings. And use HTML headings onlu for headings, not for BIG or Bold text.
» HTML Rules(Lines)
If
you want to add horizontal rule(line) across the HTML page you can use this tag
<hr />.
EXAMPLE:
<html>
<body>
<p>hr tag defines horizontal
line</p>
<hr />
<p>HTML Paragraph</p>
<hr />
<p>HTML Paragraph</p>
<hr />
<p>HTML Paragraph</p>
</body>
</html>
Result:
hr tag defines horizontal line
HTML Paragraph
HTML Paragraph
HTML Paragraph
Result:
hr tag defines horizontal line
HTML Paragraph
HTML Paragraph
HTML Paragraph
» HTML Comments
Comment
can be inserted in HTML. They can make the HTML code more understa dable.
Comment are not displayed at the browser's page.
EXAMPLE:
<html>
<body>
<!--This comment will not be
displayed.-->
<p>HTML Paragraph</p>
</body>
</html>
HTML Paragraph
» Viewing HTML Source Code
Have
you ever seen Web page source(HTML) code? If you don't and if you want we will
explain you how to do that. There are two ways - right click on the page and
click view source or right click again and click save page as, then save as
.html and after this open the saved page with notepad.
No comments:
Post a Comment