HTML Tag Glossary

HTML Tags

These are the tags you're learning to use in this HTML tutorial.
Grouped by use::

<!DOCTYPE>
The doctype displayed here without any attributes tells the browser what kind of content to expect. It is placed at the very top of the document.
<html>HTML Tag</html>
The HTML tag is used to enclose the head and body sections of an HTML document.
<head>Head Section Tag</head>
The head section tag is used to enclose the head section of a document which contains information for browsers and search engines.
<title>Title Tag</title>
The title tag is the most important tag in the head section of an HTML document. It encloses the title of your web page. It should include the major keywords describing your website.
<meta>
Meta tags are placed in the head section of an HTML document. Their most popular use is to provide a document description and list of keywords used in the document. There are many other uses for the meta tag.
<link rel="stylesheet" href="stylesheet.css" type="text/css">
This tag is placed in the head section of a document to link it to a style sheet.
<body>Body Tag</body>
The body tag is used to enclose the code that will produce the visible part of your web page.

<h1>Header Tag</h1>
The header tag comes in six default sizes, 1 thru 6. H1 is the largest. The tag is used to create page and paragraph headings.
<p>Paragraph Tag</p>
The paragraph tag is used to place paragraphs on a web page.
<a href="">Anchor Tag</a>
The anchor tag is used to create hyperlinks.
<img src="">
The Image Tag is used to place images on a web page. It is one of the few HTML tags that does not use a closing tag.
<address>Address Tag</address>
The address tag is usually used to add footer information to a web page. It can include company name, address, contact information and copyright info.
<br>
Line Break Tag can be used to break a line of text or create space between web page elements.
<table>Table Tag</table>
This is the main table tag. It must be used with the row and cell tags to complete a table.
<tr>Row Tag</tr>
The row tag is used to define rows in a table.
<td>Cell Tag</td>
The cell tag is used when building tables to divide a row into columns.

Useful Attributes Defined in Style Sheets

Attributes for Text:

font-family:
Specify a typeface. You should specify at least 2 and the last should be a generic. Most popular: arial, helvetica, tahoma, verdana, Generic: serif, sans serif
font-style:
normal, oblique
font-weight:
normal, bold, bolder
font-size:
best specified in points Ex: 8pt, 10pt, 12pt, 18pt
text-align:
left, center, right, justify
text-indent:
specify in points, ems
text-decoration:
none, underline
color:
best specified in hexidecimal code
background-color:
best specified in hexidecimal code

Attributes that work with tables:

width:
specify in percentage or pixels
height:
specify in percentage or pixels
vertical-align:
top, middle, bottom
text-align:
left, center, right
padding:
set in pixels - spacing from inside edge
margin:
set in pixels - spacing from outside edge
border:
specify type, color and width - Ex. solid #000000 1px Other types: dotted, dash, groove, inset, outset. You can also specify individual side borders: border-top:, border-right:, border-bottom:, border-left:
border:none; border-collapse: collapse
When using tables without borders this handy bit of code will get rid of the pesky cellspacing when viewing with an IE browser.

Attributes to use in HTML tag code:

<img src="image location and name" width="" height="" alt="">
In most instances these attributes are best set in the image tag itself. Control borders and margins with style sheets.
<td id="elementname">
Use the id attribute to name any element of the web page that you want to control with your style sheet. Name: tables, cells, paragraphs, header tags - Just about anything! Precede name in style sheet with a pound sign. ( #elementname )

Useful Code blocks

Code to set up a web page skeleton:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
<meta name="description" content="">
<meta name="keywords" content="">
<link rel="stylesheet" href="stylesheet.css" type="text/css">
</head>
<body>
</body>
</html>

Code for a two cell table with ids:
<table>
<tr>
<td id="left"></td><td id="right"></td>
</tr>
</table>