Interview Questions Answers.ORG
Interviewer And Interviewee Guide
Interviews
Quizzes
Home
Quizzes
Interviews Web Developer Interviews:BootstrapFront End Web DeveloperHTML DeveloperHybrid Application DeveloperInternee PHP DeveloperJnr PHP/Codeigniter DeveloperJunior Developer PHPLaravel PHP DeveloperPython DeveloperRuby DeveloperTypographyWeb Developer & DesignerWeb Developer Cum SEO AnalystWeb Development NinjasWebsite DeveloperWordPress Themes Developer
Copyright © 2018. All Rights Reserved
HTML Developer Interview Question:
Explain me how do you indicate the character set being used by an HTML5 document? How does this differ from older HTML standards?
Submitted by: MuhammadIn HTML5, the encoding used can be indicated with the charset attribute of a <meta> tag inside the document’s <head> element:
<!DOCTYPE html>
<html>
<head>
...
<meta charset="UTF-8">
...
</head>
...
</html>
This is a slightly simpler syntax from older HTML standards, which did not have the charset attribute. For example, an HTML 4.01 document would use the <meta> tag as follows:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
...
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
...
</head>
...
</html>
Submitted by: Muhammad
<!DOCTYPE html>
<html>
<head>
...
<meta charset="UTF-8">
...
</head>
...
</html>
This is a slightly simpler syntax from older HTML standards, which did not have the charset attribute. For example, an HTML 4.01 document would use the <meta> tag as follows:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
...
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
...
</head>
...
</html>
Submitted by: Muhammad
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.
https://InterviewQuestionsAnswers.ORG.