HTML Help & Resources
Miscellaneous HTML Tags
There are, of course, many HTML tags than can be used, and the remainder of the more common ones are listed below with example of use for each.
The elements of style, and how to use them, are not covered in this reference. For more information on how to utilize the power of cascadding style, visit our CSS reference instead.
OBJECT & PARAM
Is not a well supported HTML tag, in that Microsoft-based browsers do not render the code the same as Netscape-based browser models. For instance, Netscape-based browsers support an additional element in order for some objects to work properly, that is not W3C standard - the EMBED tag.
The EMBED tag is exclusive to Netscape-based browsers, and is required in order to display flash video ( unless client-side scripting is used to control the video ). Fortunately, Microsoft-based browsers will simply ignore the EMBED tag and render the object anyway.
Examples of use for various different objects is listed below.
Flash Animation
You'll notice the two separate, and distinct, formats to ensure flash video is displayed using the various browser models. Also note, Safari is not mentioned in the browser models. This is because Safari is the native browser of the Apple/MacIntosh operating system, and when used with the MAC the browser model is essentially it's own standard. However, Safari installed on a Windows platform does more closely follow the Microsoft-based browser model.
Because Microsoft-based browsers will ignore the EMBED tag, it is safe to include the EMBED tag under all circumstances to ensure video is displayed. However, in order for videos to display properly in Netscape-based browsers, the CODEBASE element should be omitted.
The CLASSID, in this example, is specific to Adobe, and does not represent any other application context. In order to access a specific application you must acquire it's classid and application-type.
"http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
<TITLE>Document Title</TITLE>
... META DATA ...
</HEAD>
<BODY>
<!-- Example of Flash video use (Internet Explorer) -->
<object id="flash_vid" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,16,0" width="640" height="480">
<PARAM NAME="movie" VALUE="flashvideo.swf">
<PARAM NAME="quality" VALUE="high">
<PARAM NAME="play" VALUE="true">
<PARAM NAME="loop" VALUE="false">
<PARAM NAME="allowScriptAccess" VALUE="sameDomain">
</OBJECT>
<!-- Example of Flash video use (Netscape: FireFox,Opera,Mozilla,Google Chrome) -->
<object id="flash_vid" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="640" height="480">
<PARAM NAME="movie" VALUE="flashvideo.swf">
<PARAM NAME="quality" VALUE="high">
<PARAM NAME="play" VALUE="true">
<PARAM NAME="loop" VALUE="false">
<PARAM NAME="allowScriptAccess" VALUE="sameDomain">
<EMBED SRC="flashvideo.swf" WIDTH="640" HEIGHT="480" PLAY="true" LOOP="false">
QUALITY="high" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" TYPE="application/x-shockwave-flash"></EMBED>
</OBJECT>
</BODY>
</HTML>
BGSOUND & EMBED
Incorporating Sounds and Music
The BGSOUND tag is exclusive to Microsoft-based browsers, and not standard HTML. This tag will not function in Netscape-based browsers. Likewise, the EMBED tag will work in Netscape-based browsers but be ignored in Microsoft-based browsers.
Example: Play: Rascal Flatts - Once ( 2009 )
Example: Play: Richard Marx - Done To Me ( 2009 )
Example: Play: 38 Special - If I'd Been The One ( 1983 )
The best way to incorporate sound and music in your web documents is to use Adobe Flash, and the Shockwave Flash Player.
"http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
<TITLE>Document Title</TITLE>
... META DATA ...
</HEAD>
<BODY>
<!-- Example of bgsound use (Internet Explorer) -->
<BGSOUND SRC="music.mp3" LOOP="3">
<!-- Example of embed use (Netscape: FireFox,Opera,Mozilla,Google Chrome) -->
<EMBED SRC="music.mp3" TYPE="audio/mpeg" AUTOSTART="true" LOOP="true" WIDTH="1" HEIGHT="1"></EMBED>
</BODY>
</HTML>
BLOCKQUOTE
The use of blockquote is not exactly common, but it can serve a purpose, and that would be to highlight a quote from an author, lyrics from a song, etc. Blockquote style is best defined with CSS, and requires a starting and ending tag.
<BLOCKQUOTE>To be or not to be. That is the question.</BLOCKQUOTE>
CODE
Use code to automatically adjust the font to a monospace type, such as courier. Code requires a starting and ending tag. Use style to adjust visual capabilities.
<CODE>This is the default code font for your browser.</CODE>
FONT
The FONT tag has been depreciated in HTML, in favor of the SPAN tag which offers more potential where style is concerned. Font requires a starting and ending tag.
<FONT FACE="Arial" SIZE="2">New font face and size.</FONT>
STRONG / B (Bold Text)
<B>Bold Text.</B> <STRONG>Bold Text.</STRONG>
EM / I (Italic Text)
<I>Italic Text.</I> <EM>Italic Text.</EM>
U (Underlined Text)
<U>Underlined Text.</U>
MAP & AREA
Using the MAP tag, in association with an IMG tag, you can define a clickable image map in your document, using pixel coordinates. An example below. MAP requires a name, opening and closing tags.
"http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
<TITLE>Document Title</TITLE>
... META DATA ...
</HEAD>
<BODY>
<!-- Example of MAP & AREA -->
<MAP NAME="imap">
<AREA HREF="[URL]" TITLE=" Title Text " COORDS="0,0,100,100" TARGET="_blank">
<AREA HREF="[URL]" TITLE=" Title Text " COORDS="0,101,100,199">
<AREA HREF="[URL]" TITLE=" Title Text " COORDS="0,200,100,299">
<!-- COORDS are x1,y1,x2,y2 -->
<!-- First URL will open in new window -->
</MAP>
<IMG BORDER=0 SRC="[URL]" ALT=" Alt Text " TITLE=" Title Text " HEIGHT="300" WIDTH="100" USEMAP="#imap">
</BODY>
</HTML>
BR & NOBR
BR will create a line-break in your document, or a blank line. The height of the line-break is dependent upon the parent tag's value set by the line-height property in CSS. BR can have individual styles attached to them through the use CSS.
<BR>
<BR CLEAR=all|left|right>
The NOBR tag is not standard HTML, however it will work in some modern browsers, like Internet Explorer 7, for example. NOBR is the equivalent to setting the white-space: nowrap; property in CSS, meaning - do not create a line-break when white-space is encountered. In other words, the following is the same:<SPAN><NOBR>This is a spaced sentence with white space.</NOBR></SPAN>
<SPAN STYLE="white-space:nowrap">This is a spaced sentence with white space.</SPAN>
It is highly recommended you do not use NOBR, instead using CSS, as it's more efficient and effective.
CENTER
The CENTER tag has been depreciated in favor of style, using for instance, text-align: center; in CSS. However, CENTER, if used, will center just about any block-level and inline element. CENTER requires a starting and closing tag.
<CENTER><P>Centered paragraph of text.</P></CENTER>
HR
Displays a horizontal line across the container width, from left margin to right margin. Using CSS horizontal lines can have height and width defined, as well as a foreground and background. HR has no closing tag.
<HR STYLE="height:4px;">
Move on to the Uncommon HTML Tags.