语义化HTML:p、h1-6、q、blockquote、hr、address、code、pre、var、cite、dfn和samp

一、元素语义                        

p标签

  W3C草案:

The p element represents a paragraph.W3C specification

  语义化的 <p>元素 表示:文章中的段落。默认样式 margin: 1em 0 

 

h1-6标签

  W3C草案:

The h1 through h6 elements are headings for the sections with which they are associated.  W3C specification

  语义化的 <h1>元素 到 <h6>元素 表示:作为相关内容的标题,且<h1>为最高级别的标题。注意:<h1>元素一般用作网页标题,网页中最多出现一个<h1>元素。

 

q标签

   W3C草案:

The q element represents phrasing content quoted from another source.W3C specification

语义化的 <q>元素 表示:引述其他人或来源的简短内容(句子),建议通过cite特性添加来源地址。注意:<q>元素的默认样式为引述的内容前后添加双引号。

 

blockquote标签

   W3C草案:

The blockquote element represents a section that is quoted from another source.W3C specification

  语义化的 <blockquote>元素 表示:引述其他人或来源的长篇幅的内容(段落),建议通过cite特性添加来源地址。注意:<blockquote>元素的默认样式为引述的段落左右添加缩进40px。

 

hr标签

  W3C草案:

The hr element represents a paragraph-level thematic break.W3C specification

  语义化的 <hr>元素 :用于表示上面的主题结束,接下来的内容属于另一个主题。

 

address标签

  W3C草案:

The address element represents contact information.W3C specification

语义化的 <address>元素 :用于表示联系的地址信息。注意:若<address>元素为<body>元素的亲子元素,则表示当前网页的联系地址信息;若<address>元素为某个段落的子元素则表示为该段落内容的联系地址信息。

 

code标签

  W3C草案:

The code element represents a fragment of computer code.W3C specification

 语义化的 <code>元素 :用于表示简短的计算机代码片段。

 

pre标签

  W3C草案:

The pre element represents a block of preformatted text, in which structure is represented by typographic conventions rather than by elements.W3C specification

语义化的 <pre>元素 :用于对内容连内容排版原封不动地显示。可用于显示大量的计算机代码片段。

 

var标签

 W3C草案:

The var element represents either a variable in a mathematical expression or programming context, or placeholder text that the reader is meant to mentally replace with some other literal value.W3C specification

  语义化的 <var>元素 :表示数学表达式、程序上下文或占位符。

 

cite标签

  W3C草案:

The cite element represents the cited title of a work; for example, the title of a book mentioned within the main text flow of a document.W3C specification

 语义化的 <cite>元素 :表示该内容为某作品的标题,作品包括诗歌、书籍、小说、电影、歌剧、电视剧、音乐、展览、报告等。

 

dfn标签

  W3C草案:

The dfn element represents the defining instance of a term.W3C specification

  语义化的 <dfn>元素 :表示该内容为特定领域的术语,用于与其他内容作区分,以便读者识别并提示读者查阅术语说明等进一步了解该内容的含义。注意:一般仅在该内容在全文首次出现的位置使用,其他位置不再通过<dfn>元素来标识该术语。

 

samp标签

   W3C草案:

The samp element represents (sample) output from a program or computing system.W3C specification

  语义化的 <samp>元素 :表示由程序或计算机输出的文本字符串。

 

二、参考                          

http://www.w3school.com.cn/tags/tag_phrase_elements.asp

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值