Webpage Tips Metatags Text Editor Preview Editor Validator Doctypes

Tips For Designing & Building Valid Webpages

The first thing you need to build a valid webpage is a Document Type Declaration (DTD). A DOCTYPE Declaration is mandatory for most current markup languages and without one it is impossible to reliably validate a document. One should place a DOCTYPE declaration as the very first thing in an HTML document.


Doctypes declare the type of Html/Xhtml document you are using to the Web browser and give the Document Type Definition (DTD) in use for the document. Declaring the doctype of your webpage also indicate to validators which specifications they should use to compare the (code) markup of the document for syntax (rules) conformity.



Different Versions Of Doctypes.

HTML 4.01 specifies Three Types of Doctype Definitions. Each version is governed by it's own rules so your markup must adhere to the specifications of the version you choose to write your document.



Which Doctype Should I Use?

It is up to you to decide which doctype you want to use to declare the markup of your document.  To me, it depends on the type of site you want to build. Site are distinguished and divided into categories based on the purpose they serve.  Use the doctype that best suite your purpose.  Below is a definition list of doctypes you can read to better understand how they work and what they do.


 

Strict
This doctype is exactly what the name definition implies. I call it "Mr. Meti" as in meticulous. There is no way around this guy.  The rules are stringently enforced so you cannot use any deprecated elements on this turf.  Strict doctype is rigid, clean, lean, mean and uncompromising. Unless you have some Xhtml experience and Css skills, try and keep your document simple and logical if you use this doctype.
Transitional
The HTML 4.0 and XHTML 1.0 transitional doctype are the most forgiving and commonly used by website designers today.  If you have to use deprecated html tags in your document, this is the ideal doctype. It is a very robust and flexible.  Unlike Strict, Transitional allows the use of many elements found to be very practical and still necessary even though deprecated.
Frameset
There is no strict doctype for Frameset. This is the least used version of the document types declarations.  Using frames to build webpages is not recommended and there are many reasons for this.

 

Writing Your Html Document Markup

Writing a standard Xhtml doctype must also include the Namespace declaration in the opening and ending html tags. The name space is the small portion of code written just below the Doctype. Once you have chosen your doctype, you can go to the text editor and start writing your code.