The HTML Workshop

The HTML

HTML
Displayed below are samples of nearly all the HTML tags out there. I could annotate each tag I list here, but frankly, I haven't the time to make an extremely comprehensive reference sheet of HTML tags and their attributes (properties). Nevertheless, this webpage that I've created for you should be at least a decent and fairly comprehensive resource for all you webmasters out there.

If you'd like a brief history of this section, read this. The HTML Workshop was created at the beginning of 1999 as a place where I randomly placed new HTML I was learning. It was a reference or library to which I could refer whenever I needed some code that I hadn't in my memory yet. There were buttons and text fields and random links and images all over the place. In 2000, I organized the mess into separate text areas (now tables) for others to use. There has been a lot for me to add since then, but the amount of material to put here is rather overwhelming. Hopefully, what I have here so far will suffice.

XHTML
By the way, we were at HTML version 4.01 when I created this section, (and we still are). You may have come across the term "XHTML", which is essentially a stricter version (by XML's rules) of HTML, with differences like stricter rules about...

- closing your tags: <p>your face</p> instead of <p>your face, and <br /> instead of <br>, and <img /> instead of <img>
- using only lowercase tags: <body> instead of <BODY>
- sandwiching your nested tags: <b><u>still your face</u></b> instead of <b><u>still your face</b></u>
- placing quotes around attributes: <p align="right"> instead of <p align=right>

(If you already code your HTML like this, wonderful. I almost do, except for the next part. The quirky part is getting used to closing single tags like <br />. Sorry, I didn't make up the rules.) XHTML is the successor of HTML, and it's currently a parallel standard coexisting with HTML for smoother transitions into the future. There's a little more to the whole XHTML story, but all you need to know is that HTML is probably not going to disappear ever. But for those who fancy XHTML, just know that once you know HTML, you pretty much know XHTML. So get cracking and hacking!

[Last major content updates: 1999-2000; Last introduction text update: 2004;]


<!-->, <!doctype>, <a>, <abbr>, <acronym>, <address>, <applet>, <area>, <b>, <base>, <bdo>, <big>, <blockquote>, <body>, <br>, <button>, <caption>, <center>, <cite>, <code>, <col>, <colgroup>, <dd>, <del>, <dfn>, <dir>, <div>, <dl>, <dt>, <em>, <fieldset>, <font>, <form>, <frame>, <frameset>, <head>, <h1>, <h2>, <h3>, <h4>, <h5>, <h6>, <hr>, <html>, <i>, <iframe>, <img>, <input>, <ins>, <kbd>, <label>, <legend>, <li>, <link>, <map>, <menu>, <meta>, <noframes>, <noscript>, <object>, <ol>, <optgroup>, <option>, <p>, <param>, <pre>, <q>, <s>, <samp>, <script>, <select>, <small>, <span>, <strike>, <strong>, <style>, <sub>, <sup>, <table>, <tbody>, <td>, <textarea>, <tfoot>, <th>, <thead>, <title>, <tr>, <tt>, <u>, <ul>, <var>

Background Features

The Body Tags

<body

bgcolor="beige" « (Background color of page)
background="image.gif" « (Image as background wallpaper if you want one)
bgproperties="fixed" « (How the background wallpaper is shown...either as fixed in place while scrolling or not)

link="blue" « (Color of a link that hasn't been clicked recently)
vlink="purple" « (Color of a link that has been clicked recently)
alink="white" « (Color of a link while it's still selected after being clicked)

text="black" « (Color of the text on the page unless specified with font tags)

marginheight="0" « (Margins at top and bottom of page)
marginwidth="0" « (Margins at left and right of page)

topmargin="0" « (Margin at top of page)
leftmargin="0" « (Margin at left of page)
rightmargin="0" « (Margin at right of page)
bottommargin="0" « (Margin at bottom of page)
>
Back to Top

Background Music

<embed src="song.mid" autostart="true" loop="true" volume="50">
<noembed><bgsound src="song.mid" loop="infinite"></noembed>
Back to Top

Font Features

The Font Tags

<font

face="times new roman,comic sans ms,helvetica"
« If the visitor's computer can't read the first font, it will try to read the second or the ones afterwards.

size="3"
« Font size is defined from a scale of 1 to 7, 1 being the largest.
-OR-
size="+0"

color="white"

-OR-
color="#000000"
-OR-
color="000000"
>
</font>
* For more on color names and color hex codes, click here.
* For the <font style='...... part, refer to my CSS section.
* For more on the differences between point, pixel, em, and % font sizes, see the Sizes section.

Font Scale

Font Size 1
Font Size 2
Font Size 3
Font Size 4
Font Size 5
Font Size 6
Font Size 7
Font Size -2
Font Size -1
Font Size +0
Font Size +1
Font Size +2
Font Size +3
Font Size +4

Formatted Text

<b> bold <b>Bold Text (Presentational)
<i> italics </i>Italic Text (Presentational)
<u> underlined </u>Underlined Text
<sup> superscript </sup> ← Superscript Text
<sub> subscript </sub> ← Subscript Text
<strike> strikeout </strike>Strikeout Text
<s> strikeout </s>Strikeout Text
<tt> teletype </tt>Teletype Monospace Text (Presentational)
<big> big <big>BIG Text (Presentational)
<small> small <small>small Text (Presentational)

<strong> bold </strong>Strong Emphasis Text (Structural)
<em> italics </em>Emphasis Text (Structural)
Back to Top

Page Structure

Doctype

HTML 4.01 Strict
Allowed: All HTML elements and attributes
Disallowed: Presentational or deprecated elements (like font tags); framesets


<!doctype html public "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>GordeonBleu</title>
</head>
<body>
<p>Gordon Mei
</body>
</html>

HTML 4.01 Loose
Allowed: All HTML elements and attributes, including presentational or deprecated elements (like font tags)
Disallowed: Framesets


<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>GordeonBleu</title>
</head>
<body>
<p>Gordon Mei
</body>
</html>

HTML 4.01 Frameset
Allowed: All HTML elements and attributes, including presentational or deprecated elements (like font tags); Framesets
Disallowed: None


<!doctype html public "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>GordeonBleu</title>
</head>
<frameset rows="50,*">
<frame name="navigate" src="pageheaderwithfiftyheight.html">
<frame name="partner" src="pagebodywithflexibleheight.html">
</frameset>
</html>

XHTML 1.0 Strict
Allowed: All HTML elements and attributes
Disallowed: Presentational or deprecated elements (like font tags); framesets
Requirements: Markup must be written in well-formed XML


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>GordeonBleu</title>
</head>
<body>
<p>Gordon Mei</p>
</body>
</html>

XHTML 1.0 Transitional
Allowed: All HTML elements and attributes, including presentational or deprecated elements (like font tags)
Disallowed: Framesets
Requirements: Markup must be written in well-formed XML


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>GordeonBleu</title>
</head>
<body>
<p>Gordon Mei</p>
</body>
</html>

XHTML 1.0 Frameset
Allowed: All HTML elements and attributes, including presentational or deprecated elements (like font tags); framesets
Disallowed: None
Requirements: Markup must be written in well-formed XML


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>GordeonBleu</title>
</head>
<frameset rows="50,*">
<frame name="navigate" src="pageheaderwithfiftyheight.html" />
<frame name="partner" src="pagebodywithflexibleheight.html" />
</frameset>
</html>

XHTML 1.1
Allowed: All HTML elements and attributes
Disallowed: Presentational or deprecated elements (like font tags); framesets
Requirements: Markup must be written in well-formed XML
Additional: Unlike XHTML 1.0 Strict, allows adding modules


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>GordeonBleu</title>
</head>
<body>
<p>Gordon Mei</p>
</body>
</html>

HTML 5
Notes: Backwards-compatible with XHTML and HTML


<!doctype html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>GordeonBleu</title>
</head>
<body>
<p>Gordon Mei
</body>
</html>
Back to Top

HTML Head, Body, and Title Bar Text

<html>
<head>
<title>This text goes in the title bar of your browser window</title>
</head>

<body>
</body>
</html>
Back to Top

Divs and Spans

<div>
This has non-semantic, but it allows you to group block elements.
<span>
Neither is this, but it allows you to style or implement interaction on inline elements.
</span>
</div>
Back to Top

Headings

<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>
Back to Top

Image Features

Image Tags

<img src="picture.gif"
alt="This text will show up in the image placeholder while the image loads."
title="This text will show when you hold the mouse cursor over the image."
height="100"
width="200"
border="2"
align="right"
hspace="1"
vspace="3">

- OR, the XHTML version -

<img src="picture.gif" />
Back to Top
<a href="index.html"
title="This text appears in the tooltip box when you hover and pause the mouse cursor over the link."
target="blank">Link</a>

(You can also use style="" and class="". See the CSS section for more info.)
Back to Top
<a href="#whee">Click here to jump to the "Whee" section.</a>


<a name=whee>
This is the "Whee" section.
Back to Top

"Top of Page" Anchor Link

<a href="#top">Click here to jump to the top of this page.</a>
Back to Top

Link Button

<form method="link" action="index.html">
<input type="submit" value="Clickable Button">
</form>
Back to Top

E-mail to:

<a href="mailto:name@company.com?subject=Insert%20Subject%20Here%20">
Back to Top

Tab Index Key

<a tabindex="1" href="something.html">Hit 'tab' key once to select this link</a>
<a tabindex="2" href="something.html">Hit 'tab' key a 2nd time to select this link</a>
<a tabindex="3" href="something.html">Hit 'tab' key a 3rd time to select this link</a>
Back to Top

Base

<head>
<base href="http://www.gordeonbleu.com" target="_top" />
</head>

<body>
<a href="somepage.html">This page will inherit gordeonbleu.com/somepage.html as the URL.</a>
</body>
Back to Top

Table Features

Table

<table bgcolor="white" border="2" bordercolor="purple" cellpadding="3" cellspacing="2" align="right" width="300" height="400" summary="Top full-width bar with two columns below. This is how we built layouts in the olden days.">
<caption>A sample table</caption>
<tr>
<td colspan="2" rowspan="1" valign="center" align="center" bgcolor="pink" width="50" height="20">
I am two columns wide.
</td>
</tr>
<tr>
<td width="50%">
My left foot.
</td>
<td width="50%">
Will always be better than the right one.
</td>
</tr>
</table>
Back to Top

Table Header, Body, and Footer

<table>
<thead>
<tr>
<th>Day of the Week</th>
<th>Attendance</th>
</tr>
</thead>
<tbody>
<tr>
<td>Sunday</td>
<td>52</td>
</tr>
<tr>
<td>Monday</td>
<td>55</td>
</tr>
</thead>
<tfoot>
</tfoot>
</table>
Back to Top

Table Scope

<table>
<thead>
<tr>
<th></th>
<th scope="col">Day of the Week</th>
<th scope="col">Attendance</th>
</tr>
</thead>
<tbody>
<tr>
<td scope="row">1.)</td>
<td>Sunday</td>
<td>52</td>
</tr>
<tr>
<td scope="row">2.)</td>
<td>Monday</td>
<td>55</td>
</tr>
</tbody>
<tfoot>
</tfoot>
</table>
Back to Top

Table Columns

<table>
<thead>
<col width="60" />
<col width="40" />
<col width="30" />
<tr>
<th>Notes</th>
<th>Day of the Week</th>
<th>Attendance</th>
</tr>
</thead>
<tbody>
<tr>
<td>This column</td>
<td>Sunday</td>
<td>52</td>
</tr>
<tr>
<td>will have</td>
<td>Monday</td>
<td>55</td>
</tr>
<tr>
<td>a width of 60</td>
<td>Tuesday</td>
<td>85</td>
</tr>
<tr>
<td>but it should be done with CSS</td>
<td>Wednesday</td>
<td>95</td>
</tr>
</tbody>
<tfoot>
</tfoot>
</table>
Back to Top

Table Column Groups

<table>
<colgroup span="2"></colgroup>
<colgroup align="center"></colgroup>
<thead>
<tr>
<th>Column 1 Header</th>
<th>Column 2 Header</th>
<th>Column 3 Header</th>
</tr>
</thead>
<tbody>
<tr>
<td>Column 1 part of colgroup spanning 2 columns</td>
<td>Column 2 part of colgroup spanning 2 columns</td>
<td>Column 3 on its own</td>
</tr>
<tr>
<td>Column 1 part of colgroup spanning 2 columns</td>
<td>Column 2 part of colgroup spanning 2 columns</td>
<td>Column 3 on its own</td>
</tr>
<tr>
<td>Column 1 part of colgroup spanning 2 columns</td>
<td>Column 2 part of colgroup spanning 2 columns</td>
<td>Column 3 on its own</td>
</tr>
</tbody>
<tfoot>
</tfoot>
</table>
Back to Top

Form Features

The Form Tags

<form method="post" action="mailto:gordon@gordeonbleu.com">
</form>

All the checkboxes, textfields, radio buttons, etc. go between these tags.
Back to Top

Drop-down Options Menu (Select)

<select name="">
<optgroup label="American Cities">
<option value="newyork">New York</option>
<option value="sanfrancisco">San Francisco</option>
<option value="seattle">Seattle</option>
<optgroup label="Canadian Cities"> <option value="toronto">Toronto</option>
<option value="vancouver">Vancouver</option>
<option value="Calgary">Calgary</option>
</select>

- OR -

<select disabled="disabled" name="">
<option value="newyork">New York</option>
<option value="sanfrancisco">San Francisco</option>
<option value="seattle">Seattle</option>
</select>
Back to Top

Checkbox

<input type="checkbox"

value="This text will show up in the textfield and can be edited by the user."
name="whatever_goes_in_here_shows_up_as_a_label_for_the_form_results_sent_to_you">
Back to Top

Radio Button

<input type="radio"

value="whatever_goes_in_here_labels_this particular_radio_button"
name="whatever_goes_in_here_shows_up_as_a_label_for_the_form_results_sent_to_you">
Back to Top

Single-Line Text Field

<input

type="text"
size="13"
maxlength="50"
value="This text will show up in the textfield and can be edited by the user."
name="whatever_goes_in_here_shows_up_as_a_label_for_the_form_results_sent_to_you"
class="see_my_css_section_to_read_more_on_customizing_colors_and_fonts_of_textareas">

(Size defines the length of the text field.)
(Maxlength defines the maximum length of text that the user inputs.)
Back to Top

Multi-Line Textbox (Textarea)

<textarea cols=100
rows=5
name="whatever_goes_in_here_shows_up_as_a_label_for_the_form_results_sent_to_you"
class="see_my_css_section_to_read_more_on_customizing_colors_and_fonts_of_textareas">

Text that goes here will appear in the textarea, and users can edit it.
</textarea>

(I put a space inside the tag in the last line to prevent it from being hidden. Remove it before you use this tag.)
Back to Top

Submit Button

<input type="submit" value="Send"

class="see_my_css_section_to_read_more_on_customizing_colors_and_fonts_of_textareas">
Back to Top

Reset Button

<input type="reset" value="Erase"

class="see_my_css_section_to_read_more_on_customizing_colors_and_fonts_of_textareas">
Back to Top

Button

<button type="button">Button Nose</button>
<button type="submit">Button Nose</button>
<button type="reset">Button Nose</button>
Back to Top

Scroll Box

<select name="Bathroom colors" size="5" multiple>
<option>White
<option>Red
<option>Green
<option>Black
<option selected>Bronze
<option>Copper
<option>Coral
<option selected> Olive Green
<option>Cyan
<option>Yellow
</select>
Back to Top

Fieldsets, Legends, and Labels

<form>
<fieldset>
<legend>Login Information</legend>
<label for="inputuser">Username:</label>
<input type="text" name="username" id="inputuser" />
<label for="inputpass">Password:</label>
<input type="password" name="password" id="inputpass" />
</fieldset>
</form>
Back to Top

Spacing and Alignment

Next Line (Carriage)

<br>

- OR, the XHTML version -

<br />
Back to Top

New Paragraph

<p>

-OR-

<p> text </p>
Back to Top

Paragraph Alignment: Left, Center, Right, and Justify

<p align="left">text</p>
<p align="center">text</p>
<p align="right">text</p>
<p align="justify">text</p>
Back to Top

Blockquote Text

<blockquote>text</blockquote>
Back to Top

Centered Text

<center>text</center>
Back to Top

List Items (Bullets)

<li>Bullet 1</li>
<li>Bullet 2</li>
<li>Bullet 3</li>


- OR, to be less proper, depending on doctype -

<li>Bullet 1
Back to Top

Unordered Lists

<ul>
<li> All this text is indented to the right. </li>
</ul>
Back to Top

Ordered Lists

<ol>
<li>This text will be</li>
<li>Numbered in order</li>
</ol>
Back to Top

Directory Titles

<dir>
<li>John</li>
<li>Paul</li>
<li>Ringo</li>
<li>George</li>
</dir>
Back to Top

Menu List

<menu>
<li>Chocolate Shake</li>
<li>Strawberry Shake</li>
<li>Vanilla Shake</li>
<li>Combo Shake</li>
</menu>
Back to Top

Horizontal Rule (Horizontal Line Divider)

<hr color="gray" size="2" width="100%" align="center" noshade>

- OR, the XHTML version -

<hr />
Back to Top

Definition Lists

<dl>
<dt>List Item 1 Title</dt>
<dd>This is a description of list item 1.</dd>
</dl>
Back to Top

Abbreviations

I love to watch the <abbr title="British Broadcasting Corporation">BBC</abbr> in the evenings.
Back to Top

Acronym

It used to be that everyone wanted to work for <acronym title="National Aeronautics and Space Administration">NASA</acronym>.
Back to Top

Address

<address>
P. Sherman
Address: 42 Wallaby Way, Sydney, Australia
Phone: (02) 5551 5678
</address>
Back to Top

Citations and Short Quotations

There is a short quotation by <cite>Epictetus</cite> that reads:
<q lang="en-us">It is impossible for a man to learn what he thinks he already knows.</q>
Back to Top

Deleted and Inserted Text

The first person to set foot on the moon was <del cite="http://gordeonbleu.org" datetime="1998-11-22 07:58:12">Louis Armstrong</del> <ins cite="http://gordeonbleu.org" datetime="1998-11-22 07:58:12">Neil Armstrong</ins>.
Back to Top

Definition Term

<dfn>Kerning</dfn> involves increases the space based on character pairs, and <dfn>tracking</dfn> increases the space between characters evenly.
Back to Top

Code, Keyboard Text, Sample Output, and Variables

<code>var <var>someVariable</var> = document.getElementById("badgeIdPlease");</code>
Kids, please refrain from typing <kbd>sudo rm -rf *</kbd> in your terminal.
I'm getting the output <samp>-bash: entergodmode: command not found</samp> in my terminal.
Back to Top

Preformatted Text

<pre>
This text will be displayed by default in a
fixed-width (monospace) font (Courier New, Courier, Monaco, Consolas...),
and will show any    s p a c e s and
line
breaks.
</pre>
Back to Top

Bidirectional Override

<bdo dir="rtl">Replace this with right-to-left (rtl) text, like Arabic.</bdo>
Back to Top

Metadata

Description of website when found by search engine (unless search engine ignores metatags)

<head>
<meta name="description" content="A page with Gordon's works.">
</head>
Back to Top

Keywords for search engine

<head>
<meta name="keywords" content="stories, poetry, Gordon, soup">
</head>
Back to Top

Author for search engine

<head>
<meta name="author" content="Gordon Mei">
</head>
Back to Top

HTTP Page Redirect

<head>
<meta http-equiv="Refresh" content="0"; url=http://www.ocf.berkeley.edu/~gordeon/">
</head>
Back to Top

Other

How to show HTML tags:

Put the 4 characters in each combination together with no spaces in between. I put spaces only so that I could show these combinations. Other wise they would show us as < and >.

& l t ;  =  <
& g t ;  =  >
Back to Top

How to make consecutive HTML spaces (nbsp - nonbreaking spaces):

Put the 4 characters in each combination together with no spaces in between. I put spaces only so that I could show these combinations. Putting multiple spaces (by Spacebar) in a row in your code will interpreted as only once space. That's why nbsp is useful.

& n b s p ;
Back to Top

Image Maps

<img src="navigation.gif" alt="" usemap="#navigation" />

<map id="navigation" name="navigation">

<area shape="rect"#the roasted kind coords="144,52,304,71" href="peanuts.html" title="the roasted kind" />
<area shape="rect"#the 411 coords="144,89,304,107" href="info.html" title="the 411" />
<area shape="rect"#fastens paper nicely coords="144,107,304,125" href="stapler.html" title="fastens paper nicely" />
<area shape="rect"#dirty pop coords="144,125,304,143" href="pop.html" title="dirty pop" />
<area shape="rect"#warm feet coords="144,143,304,161" href="socks.html" title="warm feet" />
<area shape="rect"#pink and hard coords="144,71,304,89" href="eraser.html" title="pink and hard" />
<area shape="circle"#stickies coords="223,292,27" href="postit" title="stickies" />
<area shape="poly"#sugar goodness coords="153,240,175,218,202,207,225,204,241,206,261,213,277,222,290,236,300,250,247,273,232,262,213,262,
200,272,148,246" href="candy.html" title="sugar goodness" />
<area shape="poly"#am i being too forward? coords="248,275,300,252,307,264,311,285,310,309,300,334,287,352,239,316,249,307,252,294,252,282" href="contact.html" title="am i being too forward?" />
<area shape="poly"#step back behind the line please coords="199,273,147,247,138,270,136,296,140,322,150,340,159,351,206,316,195,303,194,284" href="info_sitehistory.html" title="step back behind the line please" />
<area shape="poly"#play those scrolling credits! coords="207,316,160,353,184,371,213,379,240,378,264,370,283,357,286,353,236,315,227,319,219,318" href="credits.html" title="play those scrolling credits!" />

<area shape="default" nohref="nohref" alt="" />
</map>
Back to Top

Embedded Object

<object width="550" height="400">
<param name="flashandthings" value="flashgordon.swf" />
<embed src="flashgordon.swf" width="640" height="480">
</embed>
</object>

Used to embed Flash, Java applets, ActiveX, and other browser plugin-based media.
Back to Top

Embed Music on Page

<embed src="song.mid" width="145" height="55" autostart="false" loop="true" volume="50"></noembed>

Or to have the song play hidden in the background:
<embed src="song.mp3" hidden="true" autostart="true" loop="true"></noembed>
Back to Top

Applets

<applet code="bitsofjava.class" width="640" height="640">
I am a Java applet.
</applet>
Back to Top

HTML Comments

<div>
<!--HTML comments do not show up on the page, but appear in the source code. This makes them useful for extra annotating of your code.-->
<span>I can eat peaches all day.</span>
</div><!--They can appear anywhere in the page.-->
Back to Top

Externally Linked

Javascript (script of type Javascript)

Inline Javascript:

<head>
<script type="text/javascript">
document.write("This is very basic Javascript written inline in the HTML document.")
</script>
<noscript>
This part will run if the user does not have Javascript available.
</noscript>
</head>

Externally Linked Javascript:

<head>
<script src="jquery.js" type="text/javascript"></script>
</head>
Back to Top

CSS (style)

Inline Styles:

<head>
<style type="text/css">
@import url("evenmorestyles.css");
body {background-color:#aaccff;}
p {margin:1em 0;}
</style>
</head>

Externally Linked Stylesheet:

<head>
<link rel="stylesheet" href="htmlshop.css" type="text/css" media="all" />
</head>
Back to Top

Link Tag

<head>
<link rel="stylesheet" href="htmlshop.css" type="text/css" media="all" title="htmlshopmain" />
<link rel="alternate stylesheet" href="htmlshoptoo.css" type="text/css" media="all" title="htmlshopalt" />
<link rel="shortcut icon" href="favico.png" type="image/png" />
<link rel="alternate" href="feedmerss.xml" type="application/rss+xml" title="GordeonBleu RSS Feed" />
<link rel="alternate" href="feedmeatom.xml" type="application/atom+xml" title="GordeonBleu RSS Feed" />
</head>
Back to Top

Inline Frame (iframe)

<iframe src="pageinapage.html">
This appears if iframes aren't available to the user.
</iframe>
Back to Top

Frames

<frameset rows="50,*">
<frame name="navigate" src="pageheaderwithfiftyheight.html" scrolling="no" marginheight="1" resize>
<frame name="partner" src="pagebodywithflexibleheight.html" scrolling="yes" marginheight="1" noresize>
</frameset>

<noframes>
If the visitor's browser doesn't support frames, whatever you put here will be shown.
</noframes>

- OR -

<frameset cols="20,*,20">
<frame name="western" src="pageleftnavwithtwentywidth.html" scrolling="no" frameborder="0" resize>
<frame name="central" src="pagecenterwithflexiblewidth.html" scrolling="yes" noresize>
<frame name="eastern" src="pagerightnavwithtwentywidth.html" scrolling="no" marginwidth="1" resize>
</frameset>

<noframes>
If the visitor's browser doesn't support frames, whatever you put here will be shown.
</noframes>
Back to Top

Proprietary

Marquee ("Scrolling Text" Ticker)

<font size="3" color="white">
<marquee bgcolor="black" width="300" height="14" direction="up" loop="2" behavior="slide" scrollamount="100">
This is a scrolling marquee, and it is not supported by all web browsers (example: older versions of Netscape)m as it is a proprietary tag.
</marquee>
</font>
Back to Top
<blink>Road Work Ahead</blink>
Back to Top
 
© 1999-2009. HTML Workshop. GordeonBleu. Gordon Mei. XHTML 1.1 | CSS 2.1.