How does this look for my first HTML5 doc…
<!DOCTYPE html>
<html lang="en">
<head>
<title>Mikey's Practice Website</title>
<!-- HTML Metadata -->
<meta charset="utf-8" />
<!-- Page Stylesheets -->
<link rel="stylesheet" href="css/main.css" type="text/css" />
</head>
<body>
<header></header>
<nav></nav>
<footer></footer>
</body>
</html>
1 Like
There is no meta IE edge tag.
There is no meta viewport tag.
HTML5 dictates you don’t need to self close tags like meta/link.
What’s that?
I didn’t to the RWD stuff yet.
What does that mean?
[quote=“mikey_w, post:3, topic:196169”]
I didn’t to the RWD stuff yet.
[/quote]If you do RWD along the way, it’ll make it easier. Plus, you asked for a critique, so I gave you it.
mikey_w:
What’s that?
Google it.
mikey_w:
What does that mean?
I don’t know how else to phrase it. Do you know what self closing tags are? That’s this:
<img />
That self closes. There is no </img>
there. HTML5 says you don’t need to do that.
So I drop the trailing slash (/) ?
You’ll want to add this
<meta name="viewport" content="width=device-width,initial-scale=1" />
* you don’t need the closers,
RyanReese:
mikey_w:
What’s that?
Google it.
I did, but I don’t know what I am reading about…
XHTML 5 says that you do.
It all depends on whether you intend serving the pages as HTML or as XHTML. As has always been the case this is determined by the MIME type text/html for HTML5 (no closing slashes required) and application/xhtml+xml for XHTML5 (closing slashes mandatory)
Yes, but the OP is only asking about HTML5. Best not to confuse .
Is there some benefit to XHTML5?
There is no reason to deviate from your HTML5 path. Please do not get distracted .
SamA74
July 19, 2015, 10:37am
12
<meta http-equiv="X-UA-Compatible" content="IE=edge">
Then perhaps you should just look back to the last time @RyanReese explained it to you.
You don’t need XHTML. My doctype I switched is the HTML5 doctype and is completely compatible since it’s technically the one from HTML2 (IIRC).
We didn’t switch the IE edge to utf-8!
!!!
This is what we switched.
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
To
<meta charset="UTF-8">
Was that THAT hard to see? How do you think I switched your utf-8 charset with…the ua-compatible meta tag? I’m bewildered. Truly I am.
Then I added in these.
<meta content="IE=ed…
There are also other threads discussing its use; a simple forum search will provide more information, such as this post:
Try forcing the issue with the following meta tag.
<!-- force IE8+ into standards mode -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
It should be the first meta tag in he page.
e.g.
<!DOCTYPE HTML>
<html>
<head>
<!-- force IE8+ into standards mode -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="utf-8">
<title></title>
etc...
2 Likes
system
Closed
October 18, 2015, 8:41pm
14
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.