<html>,<head>,<body>,<title>的作用

<html> html文档的根元素(标签)

<head> 标签的内容通常给浏览器看的

<body> 标签的内容给人看的

<title> 指页面标题

示例:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<h2>This is a Main Heading </h2>
<p>This Text might be an introduction to the rest of the page.And if the page is a long one it might be split up into
    several sub-heading</p>
<h2>This is a Sub-heading </h2>
<p>Many long articles have sub-heading so to help you follow the strcuture of what is being written.There may even be
    sub-sub-heading (or lower-level headings) </p>
<h2>Another Sub-Heading </h2>
<p>Here you can see another sub-heading .</p>
</body>
</html>

  

原文地址:https://www.cnblogs.com/qq3069418554/p/8947078.html