Why This code failed validation?

Consider the following XHTML code:
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN”
“http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″/>
<title> This is an HTML document </title>
</head>
<body>
This is a test page for the departmental Web page.
</body>
</html>
This code failed validation. Why?

Consider the following XHTML code:
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN”
“http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″/>
<title> This is an HTML document </title>
</head>
<body>
This is a test page for the departmental Web page.
</body>
</html>
This code failed validation. Why?

A.
Because the <body> tag must have a code statement

B.
Because the <html> tag should use all-capital letters

C.
Because the opening <head> tag is missing

D.
Because the closing </meta> tag is missing



Leave a Reply 0

Your email address will not be published. Required fields are marked *