HTML5中time的语义其作用,HTML5中的语义元素

HTML5中的语义元素

语义元素是HTML5中最重要的介绍之一。在以前的HTML版本中,具有id或class属性的通用

标记用于构造网页。例如,为了定义侧边栏,页脚,菜单或其他结构块,使用
标签具有相应的含义(div class =“ footer”)。

HTML中的语义元素具有内在含义,并将该含义传达给浏览器和开发人员。它们清楚地定义了它们包含的内容类型(例如,使用标记代替了

)。

让我们看一下语义元素及其含义。

元素

所述元素定义文档或节的报头。它通常包含徽标,搜索栏,导航链接等。

HTML 元素的示例:html>

Title of the document

li {

display: inline-block;

margin-right: 10px;

color: #778899;

}

  • Home
  • About us

Welcome to our page


Title of the document

The content of the paragraph.

7106f305f6077478a5b0da8da2dc9364.png

元素

所述元素定义导航链接的块,或者在当前文档中或者其他文件。请注意,并非HTML文档中的所有链接都可以放在元素内;它不能包含在HTML文档中。它只能包含主要的导航块。例如,不能将标记放置在标记中,以在网站的页脚中定义链接。

HTML 元素的示例:html>

Title of the document

Programming Courses

HTML | CSS | JavaScript | PHP |

Welcome to W3Docs!

24e8b7b25045571bbd6fa55d5e0b14e7.png

元素

该元素用于指定一个独立的,自包含的内容(文章,博客文章,评论等)。元素的内容具有其含义,很容易与其余网页内容区分开。

HTML 元素的示例:html>

Title of the document

Title of the article

Text of the article

c96eb412293d8e846fb64327ad6d720d.png

元素

所述元素用于组独立部分含有逻辑连接的内容(消息块,联系信息等)在网页内。

HTML 元素的示例:html>

Using the section tag

Hypertext markup language HTML

HTML is the standard markup language for creating web pages and web applications. Browsers receive HTML documents from a web server or from local storage and render the documents into multimedia web pages. HTML describes the structure of a web page semantically and originally included cues for the appearance of the document.

CSS

A formal language that is used as a description zone, formatting the appearance of a web page written with the help of markup languages HTML and XHTML but it can be applied to any XML-document, for example, to SVG or XUL.

1519ec25bc444c8fe740ee0c28c1e3db.png

元素

所述元素定义与关于围绕元素中的内容的附加信息的部分。它通常用于通过附加信息来增强文章,或突出显示用户可能感兴趣的部分。

HTML 元素的示例:html>

Title of the document

I like watching Game of Thrones.

Game of Thrones

Game of Thrones is an American fantasy drama television series created by David Benioff and D. B. Weiss. It is an adaptation of A Song of Ice and Fire, George R. R. Martin's series of fantasy novels

b264da3aa092264f11708a4aad6d3da9.png

元素

所述元素定义了一个网页或一个部分的页脚。通常,它包含版权信息,联系方式,导航链接等。

HTML 元素的示例:html>

Title of the document

.header {

height: 40px;

padding: 20px 20px 0;

background: #e1e1e1;

}

.main-content {

height: 60vh;

padding: 20px;

}

footer {

padding: 10px 20px;

background: #666;

color: white;

}

a {

color: #00aaff;

}

Header / Menu

Main content

This is some paragraph. 

Company © 北盟网校. All rights reserved.

a0b712e201f9a8909d6a16026a6e8517.png

元素

所述元素用来提供作者或物品,文件或网页的所有者的联系人信息。

HTML

元素的示例:html>Title of the document

Author: W3docs Team

Send Mail to the Author

dbcb7997ba672b3d885aa4658184009d.png

元素

所述元素定义了页面的主要内容。标记的内容必须唯一,并且不能重复其他文档中重复的相同类型的块,例如站点的页眉,页脚,菜单,搜索,版权信息等。

HTML 元素的示例:html>

Title of the document

Programming languages

Languages HTML and CSS are intended for site layout.

HTML

 HTML (Hyper Text Markup Language) is a language of hypertext markup, which is used to create web pages. 

... 

... 

CSS

CSS is a language of styles, defining the display of HTML documents. 

... 

b85b93c7f5e0ceabcc246bca04d9cf49.png

元素

所述

元件用于指示自包含的内容。标签可以包括图像,图表,插图,代码示例等。

HTML

元素的示例:html>
Title of the document

A cute baby

      

94171f907d649d758883bdadceb0e5ce.png

元素

所述

元件用于添加签名或注释到标记。

HTML

元素的示例:html>
Title of the document

Image of a baby

      

Fig.1 – Cute baby

518bd6d66926dc659be6c1c0ae008de8.png

元素

所述元素定义在一个24小时时钟或在公历一个确切的日期的人类可读的时间。

HTML 元素的示例:html>

Title of the document.

The game will be held onSeptember 28.

It will start at 19:00

7c67bfaa478dd31fac8803a9b47346f3.png

元素

所述元件用于标记具有相关的文本的一部分。它可用于突出显示文本以显示重点,突出显示搜索结果中的搜索字词以提供上下文,或用于通过不同显示方式区分用户添加的新内容。

HTML 元素的示例:html>

Title of the document

Learn HyperText markup language (HTML) on bamn.cn website.

879acfed83f0bfdc80fd2d345313ac99.png

元素

当具有从右到左方向性的语言(例如阿拉伯语或希伯来语)与从左到右的语言内联使用时,元素用于隔离双向文本。

HTML 元素的示例:html>

Title of the documnet

 Example of using the bdi element 

أرمينيا جميلة This sentence in Arabic is automatically displayed from right to left.

ecc398b03c51755993f035090c0b0302.png

元素

所述标记用于指示浏览器,其中一个线断裂可在文本被添加。与
标签(强制浏览器插入换行符)不同,在情况下,浏览器首先分析其内容,然后在必要时插入换行符(单词或URL地址太长)。

HTML 元素的示例:html>

Title of the document

Example of a long string of text without wbr.

This is the longest word you can ever meet in the English language pneumonoultramicroscopicsilicovolcanoconiosis

Example of a long string of text with wbr.

This is the longest word you can ever meet in the English language pneumonoultramicroscopicsilicovolcanoconiosis

1945a56f7f4646060181870835d39be8.png

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值