HTML Tags Explained


A  B  C  D  E  F  H  I  L  M  N  O  P  S  T  U

<!-- ... -->

HTML comments - multiline comments, not displayed by the browser do not include two consecutive dashes (--) inside a comment.

A


<A>...</A>
Often called anchor tags. Links can be created using the <A>...</A> tags.

Attributes 

  1. HREF="..."  where location is the path and filename to the linked file or image or specifies the email address prefaced with mailto: 
  2. NAME="..." each anchor tag can be given a name - this allows you to link directly to sections where a named anchor occurs. 
  3. A # (hash) symbol is used before the name in the HREF attribute when linking.

B


<B>...</B>
Bold Text

<BIG>...</BIG>
 Large Text

<BODY>...</BODY>
This is the second section of an HTML page - defines the body information, i.e. the content of an HTML page.
There can only be one BODY tag, it must follow the HEAD tags.

  1. BGCOLOR="..." - sets the background colour using either the colour name or the hex number 
  2. BACKGROUND="..." - specifies the URL of the background image to be tiled 
  3. TEXT="..." - sets the text colour using either the colour name or the hex number
  4. LINK="..." - sets the link colour using either the colour name or the hex number
  5. VLINK="..." - sets the visited link colour using either the colour name or the hex number 
  6. ALINK="..." - sets the active link colour using either the colour name or the hex number
  7. ONLOAD="..." - triggered event when document loads 8. ONUNLOAD="..." - triggered event when document unloads
<BR>
Forces a line break. This tag is one sided - it does not act on anything.

  1. CLEAR="..." - NONE, LEFT, RIGHT or ALL, sets the location of the start of the next line

C


<CAPTION>...</CAPTION>
Table caption Attributes
  1. ALIGN="..." - TOP, BOTTOM, LEFT, CENTER or RIGHT
<CENTER>...</CENTER> 
Will centre (horizontally) information inside the tags - this tag has been deprecated.

D


<DD>...</DD>
Definition term for glossary or definition lists, <DL>...</DL>

<DIR>...</DIR>
Surrounds directory lists, uses <LI>...</LI>

<DL>...</DL>
Glossary, or definition, list tags, uses definition term tags, <DT>...</DT>, and definition tags,
<DD>...</DD>

<DT>...</DT>
Definition list term for glossary or definition lists, <DL>...</DL>

E


<EM>...</EM>
Emphasised text (often the same as italic)

F


<FONT>...</FONT>
Allows specification of the font size, color and style (face)

  1. FACE="..." - sets the font type, i.e. Arial, Times New Roman, Comic Sans, etc. 
  2. SIZE="..." - sets the font size. Use 1 to 7, or relative sizes, i.e. -1, +0, +1, etc. 
  3. COLOR="..." - sets the font colour using either the colour name or the hex number

<FRAME>...</FRAME>
Defines a frame

H


<H1>...</H1> to <H6>...</H6>
There are 6 header tags, <H1>...</H1> to <H6>...</H6> , <H1>...</H1> being the largest.

  1. ALIGN="..." - LEFT, CENTER, RIGHT or JUSTIFY

<HEAD>...</HEAD> 
This is the first section of an HTML page. The document header resides within these tags - defines the header information, such as the <TITLE> in an HTML page.
There can only be one HEAD tag and it must follow the HTML tag and preceed the BODY tag.

  1. PROFILE="..." - URL for the lcation of META data

<HTML>...</HTML>
These tags surround the entire document and define the page as an HTML page. VERSION="..." - URL of document containing type definition of the version used to create the HTML document

<HR>
Horizontal Rule - inserts a horizontal line across the screen placing everything before it above the line, and everything after in below the line. Usually there will be some blank space inserted above and below it automatically by the browser. This is a one sided tag - it doesn't act on anything.

  1. ALIGN="..." - LEFT, CENTER, RIGHT or JUSTIFY 
  2. NOSHADE="..." - rule is a solid color, not shaded 
  3. SIZE="..." - the size (height) of the horizontal rule 
  4. WIDTH="..." - the width of the horizontal rule

I


<I>...</I> 
Italic Text

<IMG>...</IMG> 
Images can be included using the <IMG> tag. SRC="..." - required specifies the location/source, or URL, of the image

  1. HEIGHT="..." where the image height can be specified in pixels (e.g. 100) 
  2. WIDTH="..." where the image width can be specified in pixels (e.g. 100)
  3. ALT="..." used to display some alternative text to the image. A good idea as often people have images switched off to speed up downloading time. Also important for partially sighted users with text readers. 
  4. ALIGN=... 
  5. Specifies the alignment, TOP , MIDDLE , BOTTOM , LEFT , RIGHT , TEXTTOP , ABSMIDDLE , BASELINE or ABSBOTTOM
  6. VSPACE="..." specifies the number of pixels of vertical space left around an image
  7. HSPACE="..." specifies the number of pixels of horizontal space left around an image
  8. BORDER="..." specifies the number of pixels width for the border around the image. Default is no border, except of images which are links. Use BORDER="0" to remove borders
  9. NAME="..." assigns a name to the image, mainly for use with JavaScript for mouse overs.
  10. LOWSRC="..." allows an initial, usually lower resolution, image to be displayed. Final image is downloaded after page layout and other LOWSRC images have been loaded.

L


<LI>...</LI>
List item tags for ordered, <OL>...</OL>, and unordered, <UL>...</UL> lists

M


<MENU>...</MENU>
Definition term for menu (short paragraph) lists, uses <LI>...</LI>

N


<NOFRAMES>...</NOFRAMES>
Alternative for browsers where frames are not supported

O


<OL>...</OL>
Ordered list tags, uses list item tags <LI>...</LI>

Attributes

  1. TYPE="..." - sets number style, 1 (1,2,3,...), a (a,b,c,...), A (A,B,C,...), i (i,ii,iii,...) or I (I,II,III,...) Default type is 1.
  2. 2. START="..." - sets start number of list Default start number is 1.

P


<P>...</P>
Paragraph tags Text within the paragraph tags will begin on a new line, and the paragraph will be separated by a blank line before and after the paragraph. In most browers it will work without an end tag, but to be on the safe side, always enclose your paragraph in a beginning and an end paragraph tag.

Attributes

  1. ALIGN="..." - LEFT, CENTER, RIGHT and JUSTIFY

S


<S>...</S>
Strikethrough Text

<SMALL>...</SMALL>
Small Text

<STRIKE>...</STRIKE>
Strikethrough Text

<STRONG>...</STRONG>
Strong emphasised text (often the same as bold)

<SUB>...</SUB>
Subscript Text

<SUP>...</SUP>
Superscript Text

T


<TABLE>...</TABLE>
Tables can be created using the <TABLE>...</TABLE> tags.
Table headers, <TH>...</TH> , rows, <TR>...</TR> , and cells (cell data), <TD>...</TD> ,can be created.

Attributes


  1. BORDER="..." defines the pixel width of the border surrounding the table. BORDER="0" turns off the border and is the default setting.
  2. WIDTH="..." specifies the width of the table in pixels (i.e. 50), or percentage of the browser window (i.e. 100%) (if within a cell already this will be percentage of cell size).
  3. CELLSPACING="..." specifies the amount of the space between cells
  4. CELLPADDING="..." specifies the amount of the space between cell edges and the cell contents
  5. BGCOLOR="..." sets the background colour using either the colour name or the hex number


<TD>...</TD>
Table data tags - surrounds an entire cell within a row within a table.

Attributes


  1. ALIGN="..." - horizontal alignment of cell contents in the row, can be LEFT, CENTER or RIGHT
  2. VALIGN="..." - vertical alignment of cell contents in the row, can be TOP, MIDDLE, BOTTOM or RIGHT
  3. BGCOLOR="..." - sets the background colour using either the colour name or the hex number
  4. WIDTH="..." - specifies the width in pixels (i.e. 50), or percentage of the browser window (i.e. 100%)
  5. ROWSPAN="..." - number of rows cell is to span
  6. COLSPAN="..." - number of columns cell is to span


<TH>...</TH>
Table header cells - surrounds an entire cell within a row within a table.

Attributes


  1. ALIGN="..." - horizontal alignment of cell contents in the row, can be LEFT, CENTER or RIGHT 
  2. VALIGN="..." - vertical alignment of cell contents in the row, can be TOP, MIDDLE, BOTTOM or RIGHT 
  3. BGCOLOR="..." - sets the background colour using either the colour name or the hex number
  4. WIDTH="..." - specifies the width in pixels (i.e. 50), or percentage of the browser window (i.e.100%) 
  5. ROWSPAN="..." - number of rows cell is to span 7. COLSPAN="..." - number of columns cell is to span


<TITLE>...</TITLE>
Defines the title of a page. This text does not appear in your web page, but appears in the title bar of the browser and when the page is bookmarked. The TITLE must be defined in the HEAD of the document. Only one TITLE can be used in each page.

<TR>...</TR>
Table row tags - surrounds an entire row within a table.

Attributes


  1. ALIGN="..." - horizontal alignment of cell contents in the row, can be LEFT, CENTER or RIGHT 
  2. VALIGN="..." - vertical alignment of cell contents in the row, can be TOP, MIDDLE, BOTTOM or RIGHT 
  3. BGCOLOR="..." - sets the background colour using either the colour name or the hex number 
  4. WIDTH="..." - specifies the width in pixels (i.e. 50), or percentage of the browser window (i.e. 100%) 


<TT>...</TT>
Typewriter or true type font

U


<U>...</U>
Underlined Text

<UL>...</UL>
Unordered list tags, uses list item tags <LI>...</LI>

Attributes

  1. TYPE="..." - sets bullet type, DISC, SQUARE or CIRCLE

No comments:

Post a Comment

C & C are welcome.