drhowarddrfine

msg:4518460 | 10:02 pm on Nov 12, 2012 (gmt 0) |
To serve web pages on the web, the only thing you should need is this:
<!DOCTYPE html>
What you have in the head is most likely unnecessary. The charset should be set in the server and that is only necessary if the page is being saved on the desktop. The second is only to make sure IE stays in its current IE standards mode but that's what the doctype is for. Good browsers, anything but IE, never had a need for it with HTML. The doctype is one that puts browsers into standards mode and has nothing to do with HTML5 actually. Side note: Doctypes only exist for IE's sake. IE is the only browser that needs one because, years ago, it started the "quirks mode" problem that other browsers had to become compatible with. The only way to get out of quirks mode was to tell the browser it was following the document type published by the W3C, hence the longer doctypes of days gone by. Fortunately, browsers today don't actually go to the URL to fetch the doctype so all that was eliminated.
|
nelsonm

msg:4518469 | 10:21 pm on Nov 12, 2012 (gmt 0) |
great thanks. I've changed it to: <!DOCTYPE html>
<html lang='en'>
<head> |
| and everything still works. Is the lang attribute in the html tag required if the web app is only used in the USA?
|
phranque

msg:4518506 | 11:42 pm on Nov 12, 2012 (gmt 0) |
| I want the site to be future proof. |
| i would include the lang attribute in the html tag.
|
nelsonm

msg:4518514 | 12:39 am on Nov 13, 2012 (gmt 0) |
thanks.
|
swa66

msg:4518690 | 10:22 am on Nov 13, 2012 (gmt 0) |
If you come from xhtml, the most logical approach is to go to polyglot (x)html5. See here: [webmasterworld.com...]
|
drhowarddrfine

msg:4519835 | 3:17 am on Nov 17, 2012 (gmt 0) |
The lang attribute is only there so things like screenreaders know the language of the document is English so it can get the pronunciation right. The html element itself is only optional.
|
|