Tags and Attributes
HTML tags consist of a left angle bracket, a tag name, folowed by a right angle
bracket, <html> (html was not case sensitive, but xhtml is case sensitive and all tags should be lower case). Tags are usually paired
to start and end the tag instruction. The end tag is identical to the start
tag witha slash preceding the text within the brackets. Some elements may include
additional instructions in the start tag, called attributes.
For example within the body tag you may add a background image -- background="images/background.jpg"; or a background color -- bgcolor="#000000"; text color; link color; alink color; vlink color...
Note on html color: The six digit number and letter combinations represent the
amount of RGB color as hexadecimal values from 00 to ff. 000000 is black or
no color and ffffff is white or fully saturated. Finding a specific color using
these number and letter combinations can be cryptic. Plenty of free online resources
are available.
Extended Quotations use the <blockquote> tag to separate the quote in
a separate text block.
<hr> is the tag instruction that produces a horizontal line the width
of the browser window, useful for separating sections of your document. The
size attribute specifies the line thickness in pixels. The width attribute specifies
the line width in percent of screen width.
Using the <p>; </P> tag for displaying short lines of text resultes
in additional spaces between lines. Using the <br /> tag causes a line to
break with no extra space.
Physical Type Styles
- <strong>;</strong> bold text
- <i>; </i> italic text
- <tt>; </tt> fixed width font
- <u>; </u> underlined text
- <sub>; </sub> subscript
- <sup>; </sup> superscript
- the <font>; </font> tags are used with the FACE, SIZE and COLOR
attributes to determine the face (such as arial), the size in points, and
color of text to be displayed.
red arial 8pt
Character Entities
- Certian characters have special meaning in HTML and therefore can't be used. So an escape sequence must be used instead.
- < for the left angle bracket
- > for right angle bracket
- & for the amprhesend
- < for the dutch o
- ñ for the spanish tilde
- È for the accent
HTML supports un-numbered or un-ordered, numbered and definition lists. Un-ordered lists
use the <ul> tag to begin the list, followed by <li> for each item </li>
and complete list by closing </ul>. The type tag attribute
can be used to specify "square" or "circle" shaped bullets - <ul type="disc">.
Numbered or ordered lists begin and end with <ol> and </ol> and can have various types of ordering - 1, I, A, a - <ol type="I">
Tables
A table consists of heads to explain what is included in columns and rows, through cells for each item.
The <table>; </table> tag defines a table in HTML, use the border=
attribute to specify border thickness.
caption tag defines a caption for the title of the table. The default position
is top-center, but the attribute align="bottom" will position the caption below
the table.
tr specifies a table tow within a table. You may specify the attributes for the entire row.
th defines a table header cell. The text in this cell is bold and centered by default.
td defines a table data cell. The text in this cell is aligned left and centered vertically by default.
Table Attributes
div align="left" OR "right" or "center"
div valign="top" OR "middle" OR "bottom"
colspan="2" -- specifies the number of columns a cell spans
rowspan="2" -- specifies the number of rows a cell spans
title perhaps
| Header Cell |
header cell 2 |
| cell contents |
cell contents |
HYPERLINK to URL
The ability to link text and images to another document is a major capability of HTML.
the default color of a hyperlink is bright blue. to change this use the link="color" attribute within the body tag.
Linking to a webpage, a href="http://www.url.com" To link to a specific page use the correct directories.
Anchors are used to link from one document to a specific section in another document or to a section within a document itself:
document A: <a href="PAGE4.HTML#INFO">; </a> document B: <a name="info">
Anchor this text </a>
Links to EMAIL: <a href="mailto:EMAILINFO@HOST">; </a>
Links to images: <a href="PATH TO IMAGE AND IMAGE NAME">
To embedd an image in a page: <img src="PATH TO IMAGE AND NAME" /> (closing forward slash within the opening tag, this tag similar to the break tag - br and the line tag - hr once did not need a closing tag).