Note: This page is still a draft in progress.
Please do not copy without crediting. Every effort is made to emphasize good coding practices which will save much time and effort in the long run. Any and all comments/suggestions in regard to this document are appreciated.
An XHTML file would minimally look like the following:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title>This is the page's title</title> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> </head> <body> <p>Page Content Goes here</p> </body> </html>
The first two lines tell the validator that this is an XHTML file while the meta tag defines the data type. If you save the above code (in a file ending with a .htm or .html filename and make it accessible to the internet), you can validate it: validator.w3.org
If you've coded in html before, simply adhere to the following rules and you should be good to go:
The following tags can be used within the body to describe your web-page.
| Formatting Tags |
|---|
| Paragraph |
The whole point of HTML has traditionally been to retain content, and leave the formatting up to the browser. Though the extensive use and expectations of the language have brought about many tools which describe formatting rather than content. XHTML attempts to retain the original intent and functionality of the markup language leaving the formatting up to Style Sheets, these are both more versitile and widely used making them well worth learning. There are three basic methods of Style Sheet implementation:
Frames are discouraged as they oppose many modeling language pricipals. This chapter is mainly targeted at migrating older websites which may have been designed using frames.
The border and frameborder attributes are no longer available in the frameset tag, making the frames visible.
The Target attribute is also no longer supported.
basic tutorial
An extensive reference
A good reference with lots of info.
Resources: RFC 2854 - The 'text/html' Media Type