Jump to content
Sign in to follow this  
phool4fool

!DocType

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

Share this post


Link to post
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.

Share this post


Link to post
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?! :)

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

I think you should start using paragraph tags if you write in paragraphs on your site. Breaks are breaks, paragraphs are paragraphs. They have a different semantic.

Share this post


Link to post
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.

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?

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...