HTML Site

Now you are prepared for the infinite world of text formatting tags. This section is larger than most others with the many tags that can and will be lumped here as miscellaneous text-related tags. Now that that has been covered, we can format the content. In the following examples, the content will appear as the tag shown. First, text can be made bold, italic, or underlined.

<HTML>
<HEAD>
<TITLE>Title of Website</TITLE>
</HEAD>
<BODY>
<B>Bold Content</B>
<I>
Italic Content</I>
<U>
Underlined Content</U>
</BODY>
</HTML>

Now, you have probably seen text in different sizes, ranging from very large to very small. This is done through use of the H tag. Valid numbers are 1 through 6, with 1 being the largest and 6 being the smallest.

<HTML>
<HEAD>
<TITLE>Title of Website</TITLE>
</HEAD>
<BODY>
<H1>Heading 1</H1>
<H2>Heading 2</H2>
<H3>Heading 3</H3>
<H4>Heading 4</H4>
<H5>Heading 5</H5>
<H6>Heading 6</H6>
</BODY>
</HTML>

Note that the heading tags H1-H6 automatically start a new line on most browsers and that they automatically are put into bold print. However, getting lines to end is another thing. You can write a Paragraph tag to automatically end lines as soon as the visual end of the browser windows is reached. A closing </P> tag is optional, but it highly recommended for browser legibility.

<HTML>
<HEAD>
<TITLE>Title of Website</TITLE>
</HEAD>
<BODY>
<P>This line can be formatted any way but will always appear as a paragraph.</P> </BODY>
</HTML>

Another way to close a line when you want it to, as long as it isn't larger than the browser window which usually forces it to break, is the BReak tag. This causes a line to end no matter what.

<HTML>
<HEAD>
<TITLE>Title of Website</TITLE>
</HEAD>
<BODY>
This is Line One<BR>
This is Line Two<BR>
This is Line Three
</BODY>
</HTML>

Appears as:

This is Line One
This is Line Two
This is Line Three

PREformatted text shows up as an even width text, meaning that a lowercase i shows up in the same exact space as an uppercase W. Also, any blank carriage returns or spacing is shown in it. This is the only exception to parsing the HTML code with 4000 blank lines and tabs.

<HTML>
<HEAD>
<TITLE>Title of Website</TITLE>
</HEAD>
<BODY>
<PRE>
This is Line One

This is Line Three
<PRE>
</BODY>
</HTML>

Shows up as:

This is Line One

This is Line Three

SAMPle text shows up exactly like preformatted, but with one major exception: It does NOT format how you put betwwen the tags.

<HTML>
<HEAD>
<TITLE>Title of Website</TITLE>
</HEAD>
<BODY>
<SAMP>
This is Line One

This is Line Three
</SAMP>
</BODY>
</HTML>

Shows up as:

This is Line OneThis is Line Three

Finally, the Horizontal Rule tag (HR) put in a rule such as below.

<HTML>
<HEAD>
<TITLE>Title of Website</TITLE>
</HEAD>
<BODY>
<HR>
</BODY>
</HTML>

Shows up as:


It doesn't really look too good in that format above, but we can shorten the width. You can express it as a percentage or a specific width. The specific width is like 640 and will be exactly that length NO MATTER WHAT.

<HTML>
<HEAD>
<TITLE>Title of Website</TITLE>
</HEAD>
<BODY>
<HR WIDTH="85%">
</BODY>
</HTML>

Shows up as:


You can also express a height for any HR tag. It can be used in conjunction with all other tags. I've not experimented with percentages here, but I think that only a specific number such as 12 can be used.

<HTML>
<HEAD>
<TITLE>Title of Website</TITLE>
</HEAD>
<BODY>
<HR SIZE="12" WIDTH="85%">
<HR SIZE="1" WIDTH="85%">
<HR SIZE="84" WIDTH="85%">
</BODY>
</HTML>

Shows up as:







Intermediate Links:

Links
Text Formatting
Images
Ordered and Unordered Lists
1