Why doc type declaration <!DOCTYPE HTML>and character encoding<meta charset ="UTF-8">is used in html5 and what's is function | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Why doc type declaration <!DOCTYPE HTML>and character encoding<meta charset ="UTF-8">is used in html5 and what's is function

3rd Jun 2017, 3:44 PM
Shaswat Singh
Shaswat Singh - avatar
2 Answers
+ 4
It delcres that it is a HTML 5 document.
3rd Jun 2017, 4:12 PM
Ekansh
+ 3
<!DOCTYPE HTML> tells browsers the webpage is in HTML5 format. and character encoding<meta charset ="UTF-8"> tells browsers what character set is using, so it can render the text on screen better.
3rd Jun 2017, 4:27 PM
Calviղ
Calviղ - avatar