内联元素 inline element
不独占一行,无法定义宽高
<strong style="background-color: blue;">123</strong>
strong em del ins span label a sub sup
块级元素 block element
独占一行,可以定义宽高
p hx div address legend fieldset ul ol li dl dt dd table form
内联块级元素 inline-block element
不独占一行,可以定义宽高
img input select textarea iframe
<p> anchor 标签(锚点)
超文本引用</p>
<p>1.超链接标签</p>
<p>2.打电话</p>
<p>3.发邮件</p>
<p>4.锚点定位</p>
<p>5.协议限定符</p>
<a href="https://www.baidu.com/">百度一下</a>
<br />
<a href="tel:17601002033">联系商家</a>
<br />
<a href="mailto:aixiaoye@lfclass.com">发邮件</a>
<br />
<a href="javascript:;">打开弹窗</a>
<br />
<strong><em>
我是一名前端工程师
</em></strong>
内联元素可以嵌套内联元素
块级元素可以嵌套任何元素
p标签不可以嵌套div
a标签不可以嵌套a标签
<!-- 我是注释 -->
1.方便后期的维护,增加代码的可读性
2.方便找bug
语义化标签:1.可读性强;2.可维护性强;3.搜索引擎对于语义化的东西比较青睐
html的发展方向是语义化的发展方向
标签:
sup 上标标签 superscripted
sub 下标标签 subscripted
105
某某 [1]
无序列表和有序列表:
无序列表
<ul type="disc">
<li>苹果</li>
<li>香蕉</li>
<li>柠檬</li>
<li>桔子</li>
</ul>
有序列表
<ol type="a" start="5">
<li>123</li>
<li>123</li>
<li>123</li>
<li>123</li>
</ol>
<ol type="1" start="5" reversed="reversed">
<li>123</li>
<li>123</li>
<li>123</li>
<li>123</li>
</ol>
scrolling =”yes|no|auto”许可滚动条|禁用滚动条|自动设置滚动条
表格:
caption 标题标签
tr table row 表格行标签
th table header cell 表头标签
td table data cell 单元格标签
align=”left|center|right”
cellpadding 单元格内边距 属性规定单元边沿与其内容之间的空白。
<table border="8" cellpadding="10">
cellspacing单元格间距 属性规定单元格之间的空间。
<table border="8" cellspacing="10">
thead 表格页眉标签 table head
tfoot表格页尾标签 table foot
tbody 表格的主体标签 table body
表单:
for=”username”
id=” username”
readonly=”readonly”只读属性1.不可输入 2.表单提交时还是会将数据提交
disabled=” disabled”(残疾)禁用属信1.不可输入 2.表单提交时不能将数据提交
<form method="GET" action="">
<fieldset>
<legend>用户登录</legend>
<p>
<label for="username">用户名</label>
<input type="text" id="username" placeholder="用户名">
</p>
<p>
<label for="password">密码</label>
<input type="text" id="password" placeholder="密码">
</p>
<p>
<input type="submit" />
</p>
</fieldset>
</form>