9/28日:
HTML5Tag
Use
the tag to group
inline-elements to format them with
styles.使用
来组合行内元素,以便通过样式来格式化它们。
例子:
/p>
HTML>
h1.intro
{color:blue;}
p.intro
{color:red;}
p.important
{color:green;}
class="intro">Header
1
class="intro">A
paragraph.
class="important">Note that this is an important
paragraph. :)
The tag also supports
theGlobal
Attributes in HTML5.The
tag also supports
theEvent
Attributes in HTML5.
HTML
The
section in an HTML document.
The
block-elements to format them with styles.
可定义文档中的分区或节(division/section)。
标签可以把文档分割为独立的、不同的部分。它可以用作严格的组织工具,并且不使用任何格式与其关联。
如果用 id 或 class 来标记
用法
是一个块级元素。这意味着它的内容自动地开始一个新行。实际上,换行是
不必为每一个
id,虽然这样做也有一定的好处。
可以对同一个
属性,但是更常见的情况是只应用其中一种。这两者的主要差异是,class 用于元素组(类似的元素,或者可以理解为某一类元素),而 id
用于标识单独的唯一的元素。