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.

DOCTYPE recommendation?

Featured Replies

Hi, I'm new to web design and although I have read a fair bit about DOCTYPE, I find it all a bit confusing.

 

I was wondering what DOCTYPE those with more experience would recommend to someone who could best be described as keen amateur who has been asked to design a few sites for friends. Some of the sites may be viewed by IE 6 and 7. I use Dreamweaver CS5.

 

To date I have used this:

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

<html xmlns="http://www.w3.org/1999/xhtml">

 

But have also used this to get IE6/7 to look ok:

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

 

Any advice you can give would be much appreciated.

 

Thanks (in advance)!

Depends what code you're planning on coding in (HTML4, HTML5 XHTML etc etc).

My person choice would be <!DOCTYPE html> as this is the up-coming standard and a lot easier to deal with. Think 'future proof'.

I don't see any reason to NOT use the simple HTML5 doctype Mike posted above. You should be following the XHTML Strict coding rules anyways, so it's the best of both worlds and doesn't involve remembering some ridiculous string of characters.

  • Author

I don't see any reason to NOT use the simple HTML5 doctype Mike posted above. You should be following the XHTML Strict coding rules anyways, so it's the best of both worlds and doesn't involve remembering some ridiculous string of characters.

 

Thanks for your post, porkchops. I'll look into HTML5.

  • Author

Think? Dream more like :D

 

W3C Doctype

 

Thanks for your post, and the link. I can see that I need to learn a lot more about DOCTYPES!

Edited by LuluG

  • Author

Depends what code you're planning on coding in (HTML4, HTML5 XHTML etc etc).

My person choice would be <!DOCTYPE html> as this is the up-coming standard and a lot easier to deal with. Think 'future proof'.

 

Thanks for your post, Mike. To be honest, I'm not sure what code I'm using! What I've learnt so far is mainly from online tutorials and books so I imagine that it could be a 'bit of this' and a 'bit of that'. Silly question perhaps, but how would I know?

 

Any recommendations on where to start to learn about HTML and CSS?

Thanks for your post, Mike. To be honest, I'm not sure what code I'm using! What I've learnt so far is mainly from online tutorials and books so I imagine that it could be a 'bit of this' and a 'bit of that'. Silly question perhaps, but how would I know?

 

Any recommendations on where to start to learn about HTML and CSS?

 

There are a few differences between XHTML and HTML.

As Porkchops mentioned above, use the HTML5 doctype (the one i posted) as this is the most recent iteration of the doctype implementation as well as being the easiest to remember by far!

 

HTML5 is really just HTML4 (and XHTML) with a few new features added and a few old practices dropped. To get going in HTML have a look at HTML Dog as they offer easy to follow tuition and, of course, if you get stuck, we're here as well!

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.