If you are creating an HTML5 document, then the document structure should be as given below :
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>
.................
</title>
........
</head>
<body>
.................
</body>
</html>
If you compare HTML5's document structure with earlier given HTML document structure, you'll notice certain changes, like :
The HTML tag similar to earlier discussed HTML tag although here the language English as been specified as attribute of HTML Tag, lang="en". you may even skip lang attribute.
META charset:
META tag's charset attribute is given to specify the character encoding used. by default for English pages, the UTF-8 character encoding is used , which is specified through it.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>
.................
</title>
........
</head>
<body>
.................
</body>
</html>
If you compare HTML5's document structure with earlier given HTML document structure, you'll notice certain changes, like :
- Additional <!DOCTYPE html> tag
- Different way of using <HTML> tag
- Additional <meta charset...>tag
- All other tags are similar.
The HTML tag similar to earlier discussed HTML tag although here the language English as been specified as attribute of HTML Tag, lang="en". you may even skip lang attribute.
META charset:
META tag's charset attribute is given to specify the character encoding used. by default for English pages, the UTF-8 character encoding is used , which is specified through it.
No comments:
Post a Comment