Now that you know how a basic HTML page is coded,
we can begin with the good stuff - how to adjust the font, add images to
your page, and add links!
The basic text formatting tags are: headings
<h1> to <h6>, paragraphs <p>,
and line breaks <br>. Also, an
important tag is the commenting tag. To add comments in code, simple enclose
your comments like so: <!-- COMMENTS HERE -->
Headings:
The heading tags are:
<h1>Heading tag</h1>
<h2>Heading tag</h2>
<h3>Heading tag</h3>
<h4>Heading tag</h4>
<h5>Heading tag</h5>
<h6>Heading tag</h6>
Paragraphs:
To automatically have the browser format paragraphs, you can use the
<p> tag. The browser will automatically
add a blank line before and after your text: Example:
<p>Hi</p><p>Hi</p> results in:
Hi
Hi
Line Breaks
Line Breaks are useful for forcing new lines. Browsers do not read ordinary
newlines (enters) in text. For example if you type the following in an html
file:
My
HTML
Code
The following will be displayed by the browser:
My HTML Code
To force the browser to display it with the breaks, simply add
<br> anywhere you want to have a new
line. Note this is one of the few HTML tags that doesn't require you to
"close" the tag (<br> - This tag does
not exist, and it makes sense if you think about it.)