|
An element used within the <TABLE>
tags. For more information, see the detailed section on Tables.
Used to specify whether your caption appears left, right or centre justified within the boundaries of the table. Alternatively used to specify the caption to appear at the top or bottom of the table. If, for example, you require the caption to be placed at the bottom to the right then you must use the VALIGN
attribute to specify the 'bottom' part and ALIGN
to specify the 'right' part.
Used to specify whether your caption appears at the top or bottom of the table when the ALIGN
attribute is used to specify horizontal positioning.
Centre justifies text and puts tables, graphics, etc. in the centre of the page.
<CENTER> This text is in the middle of the line. </CENTER>
This text is in the middle of the line.
A logical style for displaying a citation or quote. Usually (but not necessarily) displayed in italic. See also <BLOCKQUOTE>
.
Listen to Radio 1's <CITE>Evening Session</CITE> for great new music.
Listen to Radio 1's Evening Session for great new music.
A logical style for displaying examples of code. Usually (but not necessarily) displayed in a fixed-width font. See also <TT>
and <PRE>
. Use <KBD>
to indicate text to be input by a user.
The logical style <CODE>CODE</CODE> is used to display examples of programming code.
The logical style
CODE
is used to display examples of programming code.
Microsoft Internet Explorer 3 and Netscape Navigator 4 upwards only. Used to specify the text alignment for table columns. Similar to the <COLGROUP>
element. For more information, see the detailed section on Tables.
This sets the text alignment within the column.
This sets the vertical text alignment within the column. Not supported by Microsoft Internet Explorer 3
This sets the number of columns that the align
and valign
attributes act upon.
Specifies the width of the column in pixels.
Microsoft Internet Explorer 3 upwards only. Used to specify the text alignment for table columns. Similar to the <COL>
element. For more information, see the detailed section on Tables.
This sets the text alignment within the column.
This sets the vertical text alignment within the column. Not supported by Microsoft Internet Explorer 3
This sets the number of columns that the align
and valign
attributes act upon.
Specifies the width of the column in pixels.
These two tags are effectively the same and enable the author to add comments within the HTML code. These comments will not be displayed by the browser. Note that with the first element, each end tag contains two hyphens. The <COMMENT>
tag is only supported by Microsoft Internet Explorer and NCSA Mosaic.
<!-- This is a comment and will not be displayed -->
<COMMENT> This is also a comment and won't be shown either </comment>
Used to specify a definition within a definition list. For more information, see the detailed section on Lists.
Not supported by Netscape Navigator 3 or below. A logical style used to distinguish a defining instance in a section of text, ie. to highlight when a specific term is used for the first time. Usually rendered in italic.
Fluid flow regime can be determined by <DFN>Reynold's Number</DFN>.
Fluid flow regime can be determined by Reynold's Number.
Used to create directory list; essentially a short list. For more information, see the detailed section on Lists.
This element is used with style sheet attributes to designate sections of text as being of a certain style. Netscape Navigator 3 implements the <DIV>
element to work as the <P>
tag. For more information, see the detailed section on Style Sheets.
Used to create a definition list. The element must contain terms and definitions provided by the <DT>
and <DD>
tags respectively. For more information, see the detailed section on Lists.
This element defines which level of HTML your web page conforms to. It should be the first line of code on your webpage and placed before the <HTML>
tag. Your pages will work without this definition although strictly speaking it should be in place on all webpages. The following examples show how to define your pages as conforming to HTML 3.2, HTML 2 and HTML 1 respectively. For more information on how and why visit the W3 Consortium .
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.2//EN">
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 transitional//EN">
Used to specify a term within a definition list. For more information, see the detailed section on Lists.
A logical style used to give emphasis to a section of text. Usually (but not necessarily) rendered in italic. See also: <STRONG>
.
Tricky is the <EM>most original</EM> artist currently on the British music scene.
Tricky is the most original artist currently on the British music scene.
Allows you to put objects (such as sound, video, etc.) directly into an HTML page. In this way <EMBED>
is used to run Netscape plug-ins. The following attributes do not all apply to every embedded object. This element only supported by MS Internet Explorer 3 and Netscape Navigator 2 upwards. This element is not part of official HTML specification and is currently the focus of the W3C HTML working groups Compound Document draft specification and will be resolved with HTML 4.0.
The more common attributes are listed below. There may also be a number of plugin-specific attributes.
Required to provide the address of the object.
Hides the embedded object. (For example the sound controls for background music).
Loops or repeats the object n
number of times or infinitely.
Automatically starts embedded object. (For example background music).
Sets the horizontal size of the object.
Sets the vertical size of the object.
<EMBED SRC="sounds/empire.mid" AUTOSTART="false" HIDDEN="false" LOOP="true" WIDTH=145 HEIGHT=60>
You can use <EMBED>
in a similar way to the above example to play sound in the background, thus acting like MS Internet Explorer's <BGSOUND>
which is not supported by Netscape Navigator 3 and below. See Tips n' Tricks for more information on enabling background sound.
Used to change the appearance of text. See What's Wrong with the FONT Element? for guidance in appropriate use of this element.
Used to change text size. Can be used relatively (see <BASEFONT>
) or absolutely. Valid in the range 1-7. Supported by Netscape Navigator 2 and MS Internet Explorer 3 and below.
Make the text <FONT SIZE=+1> a bit bigger</FONT>,
<FONT SIZE=-1>a bit smaller</FONT>,
<FONT SIZE=7>huge</FONT> or
<FONT SIZE=1>tiny</FONT>.
Make the text a bit bigger, a bit smaller, huge or tiny.
<FONT COLOR="#00FF00">green</FONT>
<FONT COLOR="purple">purple</FONT>green
purple
Used to specify text font from a list of font faces. The list of font faces provides the browser with a choice in order of preference, depending on which fonts are installed on the user's system. Not strictly part of HTML 3.2, this attribute is supported by Netscape Navigator 3 and MS Internet Explorer 3 and below. See Font Face Considered Harmful for guidance in appropriate use of this attribute.
<FONT FACE="Arial,Lucida Sans,Gill Sans">This will probably display in Arial.</FONT>
<FONT FACE="Courier,System,MS Sans Serif">This will probably display in Courier.</FONT>This will probably display in Arial.
This will probably display in Courier.
Used to specify the start of a form. For more information, see the detailed section on Forms.
Used to define a frame. For more information, see the detailed section on Frames.
Used to define a frameset. For more information, see the detailed section on Frames.
Renders text as a heading, the rendering depending on the level of heading selected. Headings should be automatically spaced from the body text.
Justifies the heading to the left (default), right or centre.
<H1 align="center">A Centered Level 1 Heading</H1>
Some text.
<H2>A Level 2 Heading</H2>
Some more text.
A Centered Level 1 Heading
Some text.A Level 2 Heading
Some more text.
NB. If you have a browser that supports style sheets then the above headings will probably be coloured, having picked up the style definitions for this page.
The head element contains all the information about the document, such as the <TITLE>
, <BASE>
or <META>
information. It does not contain any text which is part of the document, this should be in the <BODY>
. The <HEAD>
would follow the <HTML>
tag and precede the <BODY>
element.
A shell document would therefore follow the following format:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> <HTML>
<HEAD>
<TITLE>A Shell Document</TITLE>
</HEAD>
<BODY>
The document in here
</BODY>
</HTML>
This produces a horizontal line across the screen. By default the line will be narrow and span the screen within the current indents, eg. those created by a <BLOCKQUOTE>
tag or an image.
Justifies the line left, right or centre.
Increases the vertical height (width) of the line, in pixels.
Sets the horizontal length of the line in pixels or percent. Note: use <SIZE>
to set what most people would call the line width!
Turns off the bevelling effect added to lines by some browsers.
<HR ALIGN="left" SIZE=20 WIDTH="75%" COLOR="#FF0000" NOSHADE>
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<HTML>
<HEAD>
<TITLE>A Shell Document</TITLE>
</HEAD>
<BODY>
The document in here
</BODY>
</HTML>