博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
html容器标签_HTML容器标签
阅读量:2504 次
发布时间:2019-05-11

本文共 3013 字,大约阅读时间需要 10 分钟。

html容器标签

容器标签 (Container tags)

HTML provides a set of container tags. Those tags can contain an unspecified set of other tags.

HTML提供了一组容器标记。 这些标签可以包含一组未指定的其他标签。

We have:

我们有:

  • article

    article

  • section

    section

  • div

    div

and it can be confusing to understand the difference between them.

理解它们之间的差异可能会造成混淆。

Let’s see when to use each one of them.

让我们看看何时使用它们中的每一个。

article (article)

The article tag identifies a thing that can be independent from other things in a page.

商品标签标识,可以是独立于页面其他东西事情

For example a list of blog posts in the homepage.

例如,主页中的博客文章列表。

Or a list of links.

或链接列表。

We’re not limited to lists: an article can be the main element in a page.

我们不仅限于列表:文章可以是页面中的主要元素。

A blog post

Here is the content...

Inside an article tag we should have a title (h1-h6) and

内部article标签,我们应该有一个标题( h1 - h6 )和

section (section)

Represents a section of a document. Each section has a heading tag (h1-h6), then the section body.

代表文档的一部分。 每个节都有一个标题标签( h1 - h6 ),然后是节正文

Example:

例:

A section of the page

...

It’s useful to break a long article into different sections.

将较长的文章分成不同的部分很有用。

Shouldn’t be used as a generic container element. div is made for this.

不应用作通用容器元素。 div是为此而设计的。

div (div)

div is the generic container element:

div是通用容器元素:

...

You often add a class or id attribute to this element, to allow it to be styled using CSS.

您经常向该元素添加classid属性,以允许使用CSS设置其样式。

We use div in any place where we need a container but the existing tags are not suited.

我们在需要容器的任何地方使用div ,但现有标签不合适。

This tag is used to create the markup that defines the page navigation. Into this we typically add an ul or ol list:

此标记用于创建定义页面导航的标记。 通常,向其中添加一个ulol列表:

aside (aside)

The aside tag is used to add a piece of content that is related to the main content.

aside标签用于添加与主要内容相关的内容。

A box where to add a quote, for example. Or a sidebar.

例如,在其中添加引号的框。 或侧边栏。

Example:

例:

some text..

other text...

Using aside is a signal that the things it contains are not part of the regular flow of the section it lives into.

使用aside表示它包含的内容不是它所在的部分的常规流程的一部分。

The header tag represents a part of the page that is the introduction. It can for example contain one or more heading tag (h1-h6), the tagline for the article, an image.

header标记表示页面的一部分,即简介。 例如,它可以包含一个或多个标题标签( h1 - h6 ),商品的标语,图像。

Article title

...

main (main)

The main tag represents the main part of a page:

main标签代表页面的主要部分:

  ....  

....

The footer tag is used to determine the footer of an article, or the footer of the page:

footer标记用于确定文章的页脚或页面的页脚:

....

Footer notes..

翻译自:

html容器标签

转载地址:http://baqgb.baihongyu.com/

你可能感兴趣的文章
asp.net mvc 4.0的部署
查看>>
WordPress资源站点推荐
查看>>
Python性能鸡汤
查看>>
android Manifest.xml选项
查看>>
Cookie/Session机制具体解释
查看>>
ATMEGA16 IOport相关汇总
查看>>
有意思的cmd命令
查看>>
js正則表達式语法
查看>>
JVM-垃圾回收
查看>>
VS2013 添加已有文件夹
查看>>
python 计时程序运行时间
查看>>
【Shell脚本学习4】几种常见的Shell
查看>>
Git学习系列-Git基本概念
查看>>
c#多个程序集使用app.config 的解决办法
查看>>
模仿网站登录注册
查看>>
Linux+Apache+PHP+MySQL服务器环境配置(CentOS篇)
查看>>
Linux下获取本机IP地址的代码
查看>>
(C#)调用Webservice,提示远程服务器返回错误(500)内部服务器错误
查看>>
flex布局
查看>>
python-----python的文件操作
查看>>