What is wrong with this code? (5 pts)
<html>
<body>
<h1> Hello world </h1>
</body>
<head>
<title>My First Script </title>
</head>
</html>
There are couple of issues, viz.,
1. DocType is missing. e.g. “<!DOCTYPE html>”.
2 Also consider adding a "lang"
attribute to the
html
start tag to declare the language of this
document.
3. Element Head can only be used as the first element in an
html
element if at all it is present
Better HTML would be
<!DOCTYPE html>
<html lang="en">
<head>
<title>My First Script </title>
</head>
<body>
<h1> Hello world </h1>
</body>
</html>
Get Answers For Free
Most questions answered within 1 hours.