John O
John O

Reputation: 5423

What is the correct mime type for html5 documents?

I'm pretty certain that it's more relaxed than xhtml was years ago, but Google's not burping up any definitive answers in the first few pages, and SO doesn't seem to have this either.

When I use the mime database on my files, it's coming back as "text/html", but that just makes me wonder if I've somehow got those malformed rather than it being the correct answer.

Upvotes: 3

Views: 3066

Answers (2)

Brad
Brad

Reputation: 163742

text/html is what you're looking for. Additionally, it's recommended that you set the character set in the Content-Type header:

text/html; charset=utf-8

https://www.w3.org/International/articles/http-charset/index

Upvotes: 7

WillW
WillW

Reputation: 195

You're right. text/html is correct.

Upvotes: 2

Related Questions