首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >语义化HTML:p、h1-6、q、blockquote、hr、address、code、pre、var、cite、dfn和samp

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

作者头像
^_^肥仔John
发布2018-01-18 16:13:48
7300
发布2018-01-18 16:13:48
举报

一、元素语义                        

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

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2014-12-19 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档