Jump to content

!DocType


phool4fool

Recommended Posts

!DOCTYPE html PUBLIC"-//W3C//DTD XHTML 1.0 Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"The Transitional DTD includes everything in the strict DTD plus deprecated elements and attributes:!DOCTYPE html PUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"The Frameset DTD includes everything in the transitional DTD plus frames as well:!DOCTYPE html PUBLIC"-//W3C//DTD XHTML 1.0 Frameset//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd" I want to know what is the Purpose of Strict,Transitional & Frameset Attribute........I mean to know when I've to use Strict, Transitional or Frameset Attribute.......Please explain in Details....I'll be very thankful to you. Ok bye Take Care

Link to comment
Share on other sites

Strict means you can't use depreciated elements like <font> or depreciated attributed like 'align' in things like <p align='right'> and all text must be within block-level elements.Transitional means you're allowed to have depreciated elements/attributes and you're allowed to have sloppy mark-up (you don't have to contain text in block-level elements).Frameset means when you have frames on your website using <frameset> and <frame> elements.

Link to comment
Share on other sites

Strict means you can't do things like this <br /><br /> (two line breaks in a row) and you can't use depreciated elements like <font> or depreciated attributed like 'align' in things like <p align='right'> and all text must be within block-level elements.Transitional means you're allowed to have depreciated elements/attributes and you're allowed to have sloppy mark-up (you don't have to contain text in block-level elements) and you CAN have multiple line breaks in a row (<br /><br />)Frameset means when you have frames on your website using <frameset> and <frame> elements.

What? You can't have two linebreaks in a row in Strict doctype?! :)
Link to comment
Share on other sites

Well whem I first converted my old site from Transitional to Strict about a year ago, and checked validation it came up with something like <br /><br /> not allowed to have something, I forget what it said in this locationWhen I changed "<br /><br />" to "<p></p>" it validated.Maybe they changed it since? I'm not sure, I haven't used Transitional in a long time, not since I started using Strict.If you think I made a mistake in saying that, I'll edit my other post.

Link to comment
Share on other sites

I don't know, but I never use paragraphs, because they display so inconsistantly in different browsers, and I can't remember having gotten that validation error before. I usually write in XHTML 1.1

Link to comment
Share on other sites

  • 1 month later...
Strict meansĀ  you can't use depreciated elements like <font> or depreciated attributed like 'align' in things like <p align='right'> and all text must be within block-level elements.Transitional means you're allowed to have depreciated elements/attributes and you're allowed to have sloppy mark-up (you don't have to contain text in block-level elements).Frameset means when you have frames on your website using <frameset> and <frame> elements.

But, is then strict and transitional the same, exept that in transitional "you're allowed to have depreciated elements/attributes and you're allowed to have sloppy mark-up (you don't have to contain text in block-level elements)."And I haven`t really got the point with doctype`s...What do they do?
Link to comment
Share on other sites

But, is then strict and transitional the same, exept that in transitional "you're allowed to have depreciated elements/attributes and you're allowed to have sloppy mark-up (you don't have to contain text in block-level elements)."And I haven`t really got the point with doctype`s...What do they do?

If transitional lets you write sloppy code then it can't be the same as strict because strict won't let you write sloppy code :)The point of the Doctype is so the browser knows how to render the page.If all browser makers and standards people got togerther, agreed on a standard and followed it to the letter then ther would be no need for doctypes but since that is not the case and will probable never will be then doctypes help us define hwo the browser will react to our code.I recommend you go with strict since the next gen of browsers will all be standadrds compliant (IE too i hope :)) and XHTML will take over.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...