When I click to the HTML document to open it in browser the fllowing message appears: "The character encoding of the HTML document was not declared. The document will render with index.html garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must to be declared in the document or in the transfer protocol. I don't know how can insert my code here
<meta charset="UTF-8" />
Just below <head>
Here is the HTML5 basic structure.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Title of the document</title>
</head>
<body>
<!--The content of the document......-->
</body>
</html>
Note :
UTF-8
is a character encoding capable of encoding all possible Unicode code point.
Here is more details about UTF-8
If you use Atom or sublime, you can install the the very useful package called Emmet. All you have to do is enter !
, then Ctrl+E, Emmet will automatically complete the basic structure of HTML5 for you. In this case problems like something missing or a typo will not appear, and one less thing for you to worry about.
For sublime, use Ctrl+Shift+P, and install package.
For Atom, here is the GitHub address: Emmet support for Atom
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With