Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

XHTML help!

Featured Replies

Can someone explain in more detail the 3 different DOCTYPEs: STRICT, TRANSITIONAL and FRAMESET.

 

What would be best for my website - it is going to be a business website (selling involved).

 

Example taken from w3schools:

 

<!DOCTYPE html

PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

 

Do I have to modify any of this to fit my own website???

Hi lordmagik76,

 

Strict - This is exactly what it says on the tin, the strictest doctype around. You will have to follow the specifications and guidelines to the tee, otherwise your code will fail to validate. All depreciated/presentational tags and attributes won't be allowed. The benefit to using this doctype is that your code will be uber clean and free of clutter.

 

Transitional - This doctype is slightly more lenient and will allow you to use depreciated/presentational tags and attributes. This should only really be used if people don't have CSS support and you need to use style="", for example.

 

Frameset - Use this if your website is going to use frames. It's similar to the transitional doctype in other respects.

There are 3 Doctypes you can use:

 

1) Strict:

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

This is used when you follow the specification exactly how its defined to be. Your markup will be clean and tidy with no presentational features in it (this should be added using CSS).

 

2)Transitional:

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

This is used when you want to use the presentational tags and attributes in HTML such as <font>. It is less stringent that the strict doctype.

 

3) Frameset:

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

This is very similar to transitional except it allows you to incorporate iframe (inline frames) into your website.

 

 

In answer to your question, depending on how you code will depend on which doctype is best suited to your website. There is no right or wrong doctype for "business" or "personal" sites etc. You shouldn't really have to modify any of the doctypes however, if you really want your code to validate and certain settings on the doctype you use aren't cutting it, you can modify it. However, this is incredibly rare.

 

I hope that gives you a general idea.

 

Ravi

  • Author

Thanks.

 

That answers my question. So far I have only done some reading and exercises on Html, XHtml and Css and decided to use XHtml as it is recommended for the future, but besides a general idea of how things work I have no experience whatsoever of how, what and where.

 

I am set on doing it myself however. I guess now it's just down to practice and asking lots of questions. :lol:

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.