Learn HTML step-by-step from A to Z or improve your professional skills.  Home HTML and CSS Tutorials XHTML Declarations
Your Ad Here

XHTML Declarations


XHTML DeclarationsFirst of all. There are currently Three different ways to declare an xhtml document. These ways are: strict, transitional and frameset.

Strict: This code below should appear at the top of the page before <html> or anything at all. If you do not include it, it will be included automatically as html 4.01 in most cases. Use it when you want a super clean code, Cascading Style Sheets (CSS) should be used with it.

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

Transitional : Displaying style's in the current xhtml file are valid. Cascading style sheets are not needed to declare the style of the website. This will work in all browsers. (Some browsers dont support css). It's rare to come across a browser that doesn't support css. If your browser doesn't support css, update it! Life goes on.

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

Frameset : Use this when you have one or more frames in the xhtml file.

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



Author's URL: Arnab_Ghosh
Thank you for voting.
Rate this Materials:
Bad 
1 2 3 4 5 Excellent
print this page subscribe to newsletter subscribe to rss

HTML is Hyper Text Markup Language that is used to make hypermedia and hypertext documents for the Web. More HTML and CSS: Most Popular Materials | Fresh Materials | More HTML Tutorials at Markuptutorials.com

Add comments to "XHTML Declarations"

Only registered users can write comment

Reader's comments