Setting up first HTML5 doc

How does this look for my first HTML5 doc…

<!DOCTYPE html>
<html lang="en">
    <title>Mikey's Practice Website</title>
    <!-- HTML Metadata -->
    <meta charset="utf-8" />

    <!-- Page Stylesheets -->
    <link rel="stylesheet" href="css/main.css" type="text/css" />
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. :wink:

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.

Google it.

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, :stuck_out_tongue_winking_eye:

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 :slight_smile: .

Is there some benefit to XHTML5?

There is no reason to deviate from your HTML5 path. Please do not get distracted :slight_smile: .

<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.

There are also other threads discussing its use; a simple forum search will provide more information, such as this post:


This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.