web前端开发之HTML标签汇总(1)

web前端开发之HTML标签汇总(1)

<h> 【1-6】(六种同类型的标题标签)(字体由大到小1->6)(加粗)

<h> 你好呀!</h>

 

<p> 段落标签(随着浏览器的页面变化)

<p>Here you can see another sub-heading.</p>

 

<abbr> 标记一个缩写(在鼠标指针移动到 <abbr> 元素上时显示出简称/缩写的完整版本)

<p><abbr title="Professor">Prof</abbr> Stephen Hawking is a theoretical physicist and cosmologist.</p>

 

<acronym> 标记一个首字母缩写(在鼠标指针移动到元素上时显示出缩写的完整版本)

      

 <p><acronym title="National Aeronautics and Space Administration">NASA</acronym> do some crazy space stuff.</p>

 

<address> 地址 (变斜体)

 

<a> 超链接

<p><a href="https://www.baidu.com/">baidu</a></p>

 

<b> 加粗

<b> bold </b>

 

<cite> (变斜体)

<p><cite>A Brief History of Time</cite> by Stephen Hawking has sold over ten million copies worldwide.</p>

 

<dfn> (变斜体) definitions  (定义一个定义项目)

<p>A <dfn>black hole</dfn> is a region of space from which nothing, not even light, can escape.</p>

 

<em> (变斜体)

<p>I think <em>Ivy</em> was the first.</p>

 

<hr /> (分界线)

——————————————

 

<del> (删除线)

<del>你说错了谢谢</del>

效果: 你说错了谢谢

<s>  (删除线)(等同于<del>) 【不建议使用】

<s>你说错了谢谢</s>

效果:你说错了谢谢

 

<ins> (下划线)

<ins>best</ins>

效果:best

 

<i>  (变斜体)

<i>italic</i>

效果:italic

 

<br/> (换行)

 

<blockquote>  (标记长的引用)

<html>
<body>

Here comes a long quotation:

<blockquote>
This is a long quotation. This is a long quotation. This is a long quotation. This is a long quotation. This is a long quotation.
</blockquote>

请注意,浏览器在 blockquote 元素前后添加了换行,并增加了外边距。

</body>
</html>

 

<q>  ("  ")

<q> I miss you.</q>

效果: " I miss you."

 

<strong>  (加粗) 

<strong> strong the thing </strong>

 

<sup>  (上标)

4<sup>th</sup>

4^{th}

 

<sub>  (下标)

CO<sub>2</sub>

CO2  (懂得都懂)

 

<dl>  <dt>  <dd>  (定义一个列表)

<dl>
   <dt>计算机</dt>
   <dd>用来计算的仪器 ... ...</dd>
   <dt>显示器</dt>
   <dd>以视觉方式显示信息的装置 ... ...</dd>
</dl>

计算机
    用来计算的仪器 ... ...

 

<ul>  <li>  (定义一个无序列表)(  ·  )(前面有距离)

 <ul>             

           <li>2 eggs</li>             

           <li>1tbs butter</li>           

           <li>2tbs cream</li>         

</ul>

  ·2 eggs

  ·1tbs butter

  ·2tbs cream

 

<ol>  <li>  (定义一个有序列表) (1.  2.  3.)  (前面有距离)

<ol>

            <li> the first </li>

            <li> the second </li>

            <li> the third </li>

</ol>

  1. the first

  2. the second

  3. the third

若为英文字母排序

<ol style="list-style-type: upper-alpha">
<ol style="list-style-type: lower-alpha">

 

<ul> 嵌入  <ul>  (小黑点变小白点)

<ul>             

            <li>Mousses</li>             

           <li>Pastries                 

           <ul>                     

                      <li>Croissant</li>                     

                      <li>Mille-feuille</li>                   

                      <li>Palmier</li>                   

                      <li>Profiterole</li>                 

           </ul>             

           </li>             

           <li>Tarts</li>         

</ul>

 

<img> (插入图片)  (src:为图片的地址    alt:若地址错误则显示alt内的文字  width、height:控制宽和高  align:控制在字体左边/右边/中间)

<img src="/i/eg_tulip.jpg"   alt="上海鲜花港 - 郁金香" />

 

 

<figure>  (用作文档中插图的图像)  <figcaption>  (带有一个标题)  

【带有间距 使其看起来像是一个板块】

 

 

<table>  <tr>  <th>  <td>(创建表格) (tr:行  th:表头【有加粗效果】  td:内单元格)

(border:边框的宽度  bgcolor: 表格背景颜色  width:单元格的宽度  padding:内间距  colspan:横向合并单元格的个数  rowspan:纵向合并单元格的个数  cellpadding: 规定单元边沿与其内容之间的空白   cellspacing:规定单元格之间的空白 headers:对应哪个表头单元格)

<thead>  <tbody>  <tfoot> (相当于把表格分为头身尾 利于加边框)

 

 

 

 

 

 

  • 2
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值