html4.0 div,Div

本文详细介绍了HTML中的DIV和SPAN元素,DIV作为块级元素用于组织页面结构,而SPAN用于内联字符格式化。尽管DIV在样式表中尤其有用,但它的通用性意味着它不具有特定的语义含义。文章还提到了CENTER元素在文本居中对齐上的应用,尽管其支持情况正在变化。此外,讨论了CSS定位属性在创建重叠内容效果时的可靠性。最后,强调了理解这些构造带来的问题的重要性。
摘要由CSDN通过智能技术生成

The DIV element is an all-purpose, generalized HTML Block

Structure. Use this element when you wish to define a block or section of

Styled text, and SPAN when you wish to create a

generalized in-line Character Formatting element.

Note that the DIV element was not listed in the Block

Formatting section, even though it is a Block Level element. DIV is a

generic element and does not attach any semantic meaning. It is of greatest use

when working with Style Sheets, so it is grouped with other elements of this category.

DIV CLASSes can be nested. This allows for more powerful Style Sheet mechanisms.

An author can abuse this capability by using negative margin values to create

content that overlaps other content. This effect can be achieved more reliably

using properties specified in the CSS

positioning draft. The design possibilities using overlapping content

are enormous - but understanding the issues of such constructs is also essential.

Use of the CENTER element to center align text

in a block is still recommended slightly over use of DIV because more older

browsers support it. This difference in support is quickly changing though.

Along the same lines, HTML 3.2

classifies

as a shorthand notation

of

.

This effectively makes the CENTER tag a "subset" of DIV.

DTD NOTE: Alignment attributes do not react very well

with the MULTICOL element.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值