4

What html version is code snippet below?

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="Generator" content="some info here ..." />
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
Mr. Alien
  • 140,764
  • 31
  • 277
  • 265
gandra404
  • 4,515
  • 9
  • 42
  • 62

3 Answers3

8

Lets go line by line

<!DOCTYPE html> - HTML5 Doctype

<html xmlns="http://www.w3.org/1999/xhtml"> - Refer here

<head> - Document head element

<meta name="Generator" content="some info here ..." /> Description of the program you used to create the HTML document

<meta charset="utf-8" /> - Document Character Encoding, Good read

<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> Read Here And Here


I would've certainly wrote a big fat description for each but realized that these were already asked in different questions, so thought to link them instead of repeating the same thing here again.

Community
  • 1
  • 1
Mr. Alien
  • 140,764
  • 31
  • 277
  • 265
1

The code snippet is mostly the start of an HTML5 document in XHTML (XML) serialization, sometimes confusingly called XHTML5.

It is not a conforming document, however; the current HTML5 CR does not allow the attribute http-equiv="X-UA-Compatible" (on rather formal grounds, but still).

Jukka K. Korpela
  • 178,198
  • 33
  • 241
  • 350
0

The doctype belongs to HTML5 Doctype definition.

So the rest of the document should be bases on HTML5

Rafa Romero
  • 2,326
  • 2
  • 22
  • 46