HTML中的标签和属性

1.<>内的元素叫标签 起始标签<>,结束标签</>    标签的作用就像是容器,它们告诉你起始标签和结束标签之间的内容的结构信息。

2.标签内的附加信息,放在标签内  属性名称=属性值

示例:

<!DOCTYPE html>  <!--文件类型为HTML类型-->
<html lang="en"> <!-- 文件类型的属性-->
<head>
    <meta charset="UTF-8"> <!-- 字符编码设置,一种Uinoncode编码-->
    <title>Title</title>
</head>
<body> <!-- 显示在浏览器的文本信息-->
<h1>this is the main heading </h1> <!-- 一级标题 -->
<P>this text might be an introduction to the rest of the page ,and if the page is a long one</P>
<h2>this is a sub-heading </h2>
<p>Many long acticles have sub_heading </p>
<h2>Another Sub-Heading</h2>
<p>Here you can see another sub-Heading</p> <!--段落标签用来编辑文字信息-->
</body>

  

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