Predefined Definitions

Almost all HTML tags have default style attributes. It wouldn't make much sense having all of the different tags if some of them didn't have default values associated with them. For example the <b> tag as a predefined bold attribute associated with it so that text surrounded by <b> </b> tags will appear in bold without your having to set up a stylesheet entry attaching the bold attribute to the b tag.

The same is true of all but one tag. The only tag that doesn't have any default style attributes associated with it is the <span> tag. This means that if you want a clean slate to generate your own tags then creating a class to use with the span tag is the way to go.

The only other tag that comes close to the span tag in this regard is the <div> tag which only has the block level attribute associated with it and no other style information. This makes this tag the ideal starting point for any block level tags that you require.

All other tags have predefined attributes (which are not necessarily the same in all browsers). You can of course override these defaults in may cases by specifying a different value in your stylesheet itself. Netscape 4 is rather uncooperative in this regard and doesn't allow you to negate the default values associated with the tag (although some limited changes are possible). Since you can create your own tags from scratch by assigning a class to a span or div tag there is not usually much need to override the default attributes associated with the other tags.


This article written by Stephen Chapman, Felgall Pty Ltd.

go to top

FaceBook Follow
Twitter Follow