The familiar <h1>, <h2>, <h3>, <h4>, <h5> and <h6> tags can receive a new lease of life under CSS. Adding a line H1 {} to your stylesheet allows you to standardise your headings. CodeHelp uses CSS to create all large headings in navy blue and presets the different font sizes of each heading.
Top
# was formerly only used to tack onto the end of a URL to ask the browser to show a particular section of a HTML document at the top of the display using <a name="NAME_TEXT">Heading_text</a> Other documents could then request this section using the syntax <a href ="URL#NAME_TEXT"> Link_text</a> Note that the name attribute is deprecated in HTML4.
CSS has a completely new use for # in the stylesheet - the ID selector. Example:#mailgif {vertical-align:middle; width:29; height:31; border-style:none;}Now, adding the attribute id=mailgif to any <img> tag sets all the above values. The <img> tag needs only <img src="URL" id=UNIQUE_ID border=0> This can save a considerable amount of code when you need to use graphics on a large number of pages.
Top
Every HTML document, even a frameset, needs a <head> section. The tag has no attributes and acts only as a container for <title> </title>, <base> and <meta> tags.
Top
Sets the visible height of an image or object. Objects larger than the set height may be shown with scrollbars, depending on the exact nature of the data. Images are reduced to the set size by the browser. This usually results in dithering and is best avoided by reducing the size of the graphic to match the size required for the site before uploading the files.
Top
Stylesheets can use the height property for text elements as easily as images and objects. The property can use absolute measurements in pixels or percentages of the available area. (If the element is contained within another element.)
Top
To specify a precise colour you will need to first identify the numerical RGB values using your graphics editing software. If the values are specified as hexadecimal, you can specify the colour as #RRGGBB - RR, red value in hexadecimal, GG - green, BB blue. Remember that hexadecimal is base-16:
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F - decimal
00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15
10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
- equivalent to 0 to 31
in base-10 decimal. Each colour value has a maximum of 255 or FF in hexadecimal.
Top
window.history.length;
frame.history.length;
window.history.back();
frame.history.back();back();):
window.history.forward();
frame.history.forward();
window.history.go(-2,"");"test"frame.history.go(-3,"test");
The default <hr> is a shaded rule across the width of the display with a line break above and below the line. All HTML3 attributes (like align, size, and width) are deprecated in HTML4. Stylesheet rules should be used to control the alignment, colour, size, width and positioning of the rule. The line at the base of each page in the glossary is controlled using the same stylesheet class that controls the text itself - class="halfpara".
Top
The basis for links and locations within the web. Also used to provide the URL of a linked stylesheet in the line <link rel="stylesheet" href="URL" type="text/css"> The URL used for href can be relative (../index.html) absolute (http://www.codehelp.co.uk/index.html). It can specify specific files or allow the browser to locate the default file (http://www.codehelp.co.uk/). The URL can also contain additional data like anchors (glossaryA.html#anchor) and CGI data (search.pl?terms=code&case=Insensitive).
Top
Every HTML file needs a beginning <html> and an ending </html> pair of tags. Any content outside this tag could be ignored by the browser or could lead the browser to display the file as a text file - showing the source code instead of the page. Many pages omit the end tag - browsers assume that the whole document is in HTML format - but this is not good practice.
Top
| Handler | Element | Version |
|---|---|---|
| onClick() | Button, Link Return false to cancel default action. | all |
| HTMLElement | 1.2 | |
| onKeyDown() onKeyPress() onKeyUp() | Document, Image, Link,
Password, Text, Textarea Return false to cancel default action. | 1.2 |
| onMouseDown() onMouseUp() | Document, Link, Image, Button Return false to cancel default action. | 1.2 |
| onMouseOver() onMouseOut() | Link Return true to prevent URL display. | all |
| Image, Layer Return true to prevent URL display. | 1.2 |