My friend has tried to code a website like this
<html>
<head>
<style>
h1 {
color: red;
}
</style>
<div>
<h1>
My Website
</h1>
</div>
</head>
<body>
<nav>
<a>example link</a>
</nav>
</body>
he hasn't used <!DOCTYPE html> and he has also put his page header in the <head> element. when I try to tell him that you need a <!DOCTYPE html> and you cant put content in the <head> element he says well it worked and you still haven't told me what's wrong with doing that. I don't know to explain it to him so can someone please say why you can't do this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…