Find us on twitterLike us on facebook
View Portfolio

PHP Library

Support Us

CSS Library

Adding a doctype to your webpage Adding a doctype to your webpage

Adding a doctype to your webpageDoctype is a special declaration at the very top of your webpage source, right above the tag, that informs validators the rules in which to validate your page using, and for modern browsers (IE6+, Firefox, NS6+, Opera, IE5 Mac), whether to display your page in Quirks or Standards mode. Below lists the major doctypes you can deploy on your webpage. All of them enters modern browsers into Standards mode when used. Devsocial.net offers free online tutorials, references and free SEO Tools the world wide web design library.

Table of Contents
  1. XHTML 1.0 Transitional, Strict, Frameset
  2. XHTML 1.1 DTD

info HTML 4.01 Transitional, Strict, Frameset

HTML 4.01 transitional doctype supports all attributes of HTML 4.01, presentational attributes, deprecated elements, and link targets. It is meant to be used for webpages that are transitioning to HTML 4.01 strict:



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

HTML 4.01 Strict is a trimmed down version of HTML 4.01 with emphasis on structure over presentation. Deprecated elements and attributes (including most presentational attributes), frames, and link targets are not allowed. CSS should be used to style all elements:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">


HTML 4.01 frameset is identical to Transitional above, except for the use of <frameset> over <body>:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http://www.w3.org/TR/html4/frameset.dtd">

XHTML 1.0 Transitional, Strict, Frameset

Use XHTML 1.0 Transitional when your webpage conforms to basic XHTML rules, but still uses some HTML presentational tags for the sake of viewers that don't support CSS:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 Use XHTML 1.0 Strict when your webpage conforms to XHTML rules and uses CSS for full separation between content and presentation:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

XHTML 1.0 frameset is identical to Transitional above, except in the use of the <frameset> tag over <body>:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">

XHTML 1.1 DTD

XHTML 1.1 declaration. Visit the WC3 site for an overview and what's changed from 1.0:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" 
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

Rating:

Capable: broswers

Date Posted: 2/5/2023

info Note: Make sure your page contains a valid doctype for this menu to render properly.

info Revision History: Nov 8th, 2023': updated code..

info Usage Terms: | Please Read - -> >

Viewed: 57,367

info Share our library with others. Spread the love. Share: share on facebook

Was this article & Examples Helpful ?
If so you can help us bring this and more to become available for you at anytime. You can help us by donating any amount or Sharing & Following Us. Donate through PayPal.

info More useful links:

Buy Ready made Web Apps  Buy Ready made Web Apps


Website Ranking Tools

classifieds24.net classifieds24.info classifieds24.org nywds.com https://www.globalclassifieds.org/ domainpaid.net devsocial.net paystopost.com paystopost.org https://www.101now.com https://www.newyorkconstructionco.com paystopost.org https://www.hirepros.org https://www.hirepros.info
EST: 2012 | © 2025 Devsocial.net | All Rights Reserved. [ + ][ y ]
SHARE:

Facebook

Twitter