February 16, 201214 yr 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)!
February 16, 201214 yr 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'.
February 16, 201214 yr 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.
February 16, 201214 yr 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.
February 16, 201214 yr Author Think? Dream more like W3C Doctype Thanks for your post, and the link. I can see that I need to learn a lot more about DOCTYPES! Edited February 16, 201214 yr by LuluG
February 16, 201214 yr 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?
February 16, 201214 yr 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