This page provides examples of some of HTML's tags. I assembled it so that I can copy/paste HTML code without having to remember the details of HTML. I find I have less typos with this method. If you are new to HTML, you might find this page useful. To get the most use out of this page, save it as source code and examine it off line. Open it in your text editor (or Word) and simultaneously open the file with your browser, switch between the text editor and the browser and you will see how the HTML code (shown in the text editor) is tranformed into a HTML document (shown in the Browser). Some of the HTML tags need Netscape to work properly.
When you examine the HTML source code you will occasionally see some strange combinations of characters. These are the result of using special characters that are reserved for use in HTML scripting. The < and > characters are frequently used in HTML scripting, so if you want to write some text that uses those characters (that is, you want those characters to be displayed in a Web page, i.e. this page), you must use special alternate versions of those characters so that the Browser won't try to interpret a < or > character (and the other adjacient characters) as being part of some HTML code.
The special character equivalents are shown below:
additional special characters:
Some browser can interpret normal quotation marks without needing the alternate version. I have used the alternate version frequently on this page. When you view the HTML source code and encounter these combination of characters, notice how they are interpreted in the Web page. Examining this section will provide an interesting example of the use of this type of HTML scripting.
To Page IndexThese are referred to as the opening and closing tags. Usually embedded in the opening tag is some additional code.
To define sections of the page with a unique name you can use
<A NAME="name_of_your_choice">
as the opening tag. This will allow you to link to this location later by referring to the name you have just defined (which contains no spaces, notice the underline character in between the words).
A generic form of the anchor definition is shown below.
<A NAME="Section_Name">Section Header</A>
Section_Name and Section Header are any names you might want to chose, most logically you would choose the name of the topic discussed at that section. Everything else should be typed in exactly as written, including the quotation marks. The only thing that shows up on the page is the Section Header (Section_Name is the anchor name that is pointed to by the HREF command discussed below. It is important in the process but not displayed on the screen)
You can then link to these anchors using the following tag:
<A HREF=#Section_Name>Go to Section</A>
The phrase "Go to Section" (or whatever descriptive phrase you decide to use) will be underlined and when you click the mouse on that phrase you will jump to the appropriate section. You must however, use the exact same name in the Section_Name location that you previously defined in the corresponding anchor. Also, be sure to preceed the Section_Name with the # character but no quotation marks are used in this tag.
The links of this list take you to different sections of this page.
There are several type of lists
Look at the source code of this page to see how the following list tags work.By nesting one list within another you can create an Outline Style Presentation
This list contains links to another page
In this first paragraph we thought it would be an exceptionally Bold to use physical styles to come right out and italicize some text or maybe even use a monospaced typewriter font. There are several physical style tags1. Sometime you want to underline something or show some deletion from a previous version.
This second paragraph we are going to use the logical style so that we will emphasize some text or even strongly emphasize some text. We also highlight a word by using the definition tag. We can cite at short quote if it tickles our fancy. "In the beginning there was the blues" (GOD 1865) or we could include a short <sample of text> . If we want we could show a <sample of code>
or even show the user that some <text needs to be entered> . There is even a style for <a variable>. There are eight different logical style tags:
sample of code
</CODE>
<BLOCKQUOTE>
The Blockquote tag is used for extended quotes (or any other use you see fit). It will indent the passage, setting it apart from the formating of the surrounding text. The example shown below uses two nested blockquote tags, i.e. <blockquote><blockquote> creating two different levels of indentation. At the end of the quoted material the </blockquote> closing tag is used.
The double blockquote tags are right before this sentence. This is the innermost blockquote and it is indented the most. Using nested blockquotes allows you to essentially change the margins of the text anywhere on the page. You don't have complete control of the margin settings with this technique, however it can still be very effective. After this sentence comes the first closing </blockquote> tag.This is the next level of blockquote, the outer nest if you will. Notice the change in the left and right margins. It is a technique that comes in handy for creating certain layouts. Of course you can change font size and/or use any of the above mentioned character formatting tags in conjunction with the blockquote tag (I don't use them here). After this sentence comes the second closing </blockquote> tag;. Check out the source code.
Use ALIGN=CENTER inside a header or paragraph tag
You have control over the SIZE (in thickness)and WIDTH (distance across the page) of the horizontal rule tag. You can also select a ALIGN=RIGHT or ALIGN=LEFT tag. Finally you can use a NOSHADE tag to display a black line. The horizontal rules shown here illustated some of the possiblities. Check out the source code.
The default setting for the <HR> tag is centered.
You can align them to the left margin
(these also use the NOSHADE attribute)
Or you can align them to the right margin.
Using the <FONT SIZE=(1-7)>This Text will be display at the selected font size</FONT>
This is an example of a bigger font size and a smaller font size
The following table demonstating font sizes comes from Web Publishing with HTML by Laura Lemay, a fabulous book in my opinion. I've never met her yet she has taugh me most of what I know about HTML. She also has a great web site supporting her books at:
1 | 2 | 3 | 4 | 5 | 6 | 7 |
---|---|---|---|---|---|---|
Font | Font | Font | Font | Font | Font | Font |
You can use different types of bullets with unordered lists. Check out the source code.
You can use the ADDRESS tag to let people know how to get in touch.
The form is as follows: <ADDRESS> Your E-mail, Fax, etc. goes here </ADDRESS> The ADDRESS TAG looks like this, it displays in italics.Personally, I think it can make one's address more difficult to read,. That's why I use it for copyright notices, no one reads those anyway.