3
I have an HTML file which I have defined as follows
<!DOCTYPE html>
<html lang="pt-br">
<head>
<title>Prompt</title>
<meta charset="UTF-8" />
<link rel="stylesheet" href="style/prompt.css" type="text/css">
</head>
</html>
In my file css prompt. stylized as follows
*{margin:0; padding:0;}
body{
background:#000;
}
As a result, the browser interpreted that the BODY TAG existed and left the background in BLACK, as defined in css.
The point is, why did this happen ?
What’s the idea of having an HTML page without the tag
<body>
?– Sergio
It’s not an idea, it turns out I forgot to put it. Then the doubt arose.
– Mauro Alexandre
Current browsers already add the default tag.
– Laerte