Imperial Club HTML tutorial, basic tags

Imperial Home Page -> Standards -> HTML tutorial, basic tags

<h1>-<h8> header tags H1 is the biggest, h8 the smallest, h7 and h8 aren't supported by all browsers, and there isn't much difference in size between them and h6



<br>line break
<p>new paragraph (this is equivalent to <br><br>)
     attributes for <p>
     align=(left, center, right)
Centers the line on the screen

<hr>horizontal rule (line)

     width=xx% (percent of the horizontal width of the browser to cover)
     width=xx (number of pixels wide)
     size=xx (number of pixels high)
     color= (color of the line, this only works in IE)

<font>sets the font, attributes as follows
     size=(-6 to +6), +6 being huge and -6 being unreadably small)
<font size=+6>
<font size=-6>
     face=the name of the font to use (arial, times new roman, courier etc)
     color=the color of the font (see the hex codes or the named colors)
<font color="red">

<pre>Preformatted text

 This is     preformatted text
		you can type things and they will appear as you typed them, without needing any tags
you are entirely responsible for the formatting, and you are limited in fonts and other things

<body>here are some attributes to go with the body tag
     bgcolor=sets the background color for the page (this can also be used within a table definition, table row definition, and table data definition)
     background=sets the background of the page to be the image specified. The image will be tiled if it isn't large enough to fill all of the space (this can also be used in tables and table elements)
<!-- -->comment tag--anything in this tag won't appear on the page


<a>anchor tag
     attributes for anchors
     href=the url or path to the object you are pointing to. Href can also contain mailto:email@dress to send an email to the address. If you put a #name at the end of the url or path, it will go to the point name within that page
     name=the name of the object being pointed at by an href


<img>denotes that an images should be placed on the page
     src=the path to where the image is stored (this can be local or remote c:/images/image.gif or
     border=sets the size (in pixels of the border around a picture)
     align=left, right, center, top, bottom, middle (top bottom and middle only work on 1 line of text)
     height=the height in pixels of the image (this must come before the width attribute)
     width=the width in pixels of the image
     alt=Text to display while image loads

Continue on to Section 3 Images

This page was last updated 24 May, 2005.  Send us your feedback, and join the Imperial Mailing List online car club today!