XHTML Reference


go to previous section go to next section 

General Formatting

 

Commenting your source

Comments can be placed anywhere within an HTML document except within the other tags used to markup the document. All comments begin with <!-- and end with -->. The XHTML specification states that the content of comment fields should be ignored so the practice of enclosing script and style statements within comments no longer works with browsers that comply with the XHTML standard.

go to top

 

Paragraphs

The basic unit of text within a document is the paragraph. Each paragraph within the document should be contained between the following tags <p> </p>. Note that the XHTML standard requires all end tags to be specified.

The following optional attributes can be specified on a <p> tag:

The following attributes are deprecated but can still be used with the transitional DOCTYPE

go to top

 

Headings

There are six different heading levels that can be used to place headings within your document. The heading should be placed between the appropriate pair of tags from the following:

The following optional attributes can be specified on a heading tag:

The following attributes are deprecated but can still be used with the transitional DOCTYPE

go to top

 

Other section breaks

The following two pairs of tags allow you to split your document up into sections which can be formatted and manipulated differently from the other sections of your document.

The following optional attributes can be specified on <div> and <span> tags:

go to top

 

Physical Styles

These styles are always rendered the same way provided that the browser that is being used supports them. If a browser does not support rendering in that way then the tags will be ignored.

The following optional attributes can be specified on physical style tags:

go to top

 

Logical Styles

These styles can be rendered in different ways by different browsers. These tags are more descriptive of the type of item contained within the tags rather than the way that you want it displayed. Some of these are relatively new and may not be recognised by some browsers. You can see how the various tags display on your browser below.

The following optional attributes can be specified on logical style tags:

go to top

 

Size

You can modify the size of the text being displayed using the following pairs of tags.

The following optional attributes can be specified on size tags:

go to top

 

Line Breaks

The following tags and tag pairs manipulate the position that text appears on the page.

go to top

 

New or Removed

You can indicate new or removed text on your page using the following tags.

The following optional attributes can be specified on an <ins> or <del> tag:

go to top

 

Other format types

The <bdo dir=""> </bdo> tags surround text in foreign languages so that the direction of the text can be indicated to the browser. Direction can be LTR (left to right) or RTL (right to left).

The following optional attributes can be specified on the <bdo> tag:

go to previous section go to next section 

 

This article written by Stephen Chapman, Felgall Pty Ltd.

go to top

FaceBook Follow
Twitter Follow
Donate