标题(h1,h2,h3等)规格 [英] Headings (h1, h2, h3, etc.) Specifications

查看:74
本文介绍了标题(h1,h2,h3等)规格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好。


我想知道HTML标准对标题的说法

说明符(h1,h2,h3等)。具体来说,我想知道

这些标签是否有浏览器在文本上方和下方包含一个空行

包括在之间,比方说,< h2>< / H2>标签。

我已经查看了至少三本讨论h-tag的书籍,但

它们都没有提到标准所说的内容。


仅仅是为了测试,我写了一个虚拟页面,其中包含一个章节标题

,例如< h2>章节测试#1< / h2> ;.

我注意到当用于标记表格列的头部时

(i)Microsoft IE在测试#1下面添加一个空行;

(ii)Mozilla和Opera不要在下面添加一个空行Chapter Test

#1。


有人请让我知道标准说的是什么。


一个相关的问题:我该如何控制这个功能;我想确保

标题下面没有额外的间距。


提前感谢任何建议。


Michael

解决方案

" Michael Hill" < MH ***** @ netzero.net>在消息中写道

news:71 ************************** @ posting.google.c om ...

大家好。

我想知道HTML标准对标题
说明符(h1,h2,h3等)的说法。具体来说,我想知道这些标签是否有浏览器在文本上方和下方包含一个空白行,包括在< h2>< / h2>之间了。我至少看了三本讨论h标签的书,但是没有人提到标准说的内容。

只是为了测试,我写了一个包含章节标题的虚拟页面
例如< h2>章节测试#1< / h2> ;.
我注意到用于标记表格列的头部时
(i)Microsoft IE在测试#1章下面添加一个空行;
(ii)Mozilla和Opera不要在测试章节#1下面添加一个空白行。
有人请让我知道标准说的是什么。


标准没有具体说明这一点。每个浏览器制造商都可以自由地按照他们认为最合适的价格购买。

相关问题:如何控制此功能;我想确保标题下面没有额外的间距。




使用CSS,例如''h1 {margin-bottom:0;填充底:0; }'',但请记住

一些旧版浏览器缺少CSS,所以结果不确定。




Michael Hill < MH ***** @ netzero.net>在消息中写道

news:71 ************************** @ posting.google.c om ...

大家好。

我想知道HTML标准对标题
说明符(h1,h2,h3等)的说法。具体来说,我想知道这些标签是否有浏览器在文本上方和下方包含一个空白行,包括在< h2>< / h2>之间了。标签。


这不是一个空白行,它是一个非零保证金。

这些没有标准。这些或任何其他HTML元素的默认边距由相关浏览器应用于这些元素的默认样式确定




[snip]

一个相关的问题:我该如何控制这个功能;我想确保标题下面没有额外的间距。




在样式表中用你自己的边距覆盖默认边距。


2004年6月7日09:34:18 -0700, mh ***** @ netzero .net (Michael Hill)

写道:

有人请让我知道标准说的是什么。




去看看该死的东西。
http ://www.w3.org/TR/html4


它不是空行,它是边距。试试Lie和Bos为

a体面的CSS介绍书。


-

Smert''webionionam


Hi, folks.

I am wondering what the HTML standard says regarding the headings
specifiers (h1, h2, h3, etc.). Specifically, I would like to know if
these tags have the browser include a blank line above and below text
included between the, say, <h2></h2> tags.
I have looked through at least three books that discuss the h-tags but
none of them mention what the standard says.

Just for a test, I wrote a dummy page that included a chapter heading
such as <h2>Chapter Test #1</h2>.
I notice that when used to label the heads of table columns
(i) Microsoft IE adds a blank line below "Chapter Test #1";
(ii) Mozilla and Opera do NOT add a blank line below "Chapter Test
#1".

Somebody please let me know what the standard says.

A related question: how can I control this feature; I want to ensure
NO extra spacing below the headings.

Thanks in advance for any advice.

Michael

解决方案

"Michael Hill" <mh*****@netzero.net> wrote in message
news:71**************************@posting.google.c om...

Hi, folks.

I am wondering what the HTML standard says regarding the headings
specifiers (h1, h2, h3, etc.). Specifically, I would like to know if
these tags have the browser include a blank line above and below text
included between the, say, <h2></h2> tags.
I have looked through at least three books that discuss the h-tags but
none of them mention what the standard says.

Just for a test, I wrote a dummy page that included a chapter heading
such as <h2>Chapter Test #1</h2>.
I notice that when used to label the heads of table columns
(i) Microsoft IE adds a blank line below "Chapter Test #1";
(ii) Mozilla and Opera do NOT add a blank line below "Chapter Test
#1".

Somebody please let me know what the standard says.
The standard says nothing specific about this. Each browser maker is free to
do what they think most suitable.
A related question: how can I control this feature; I want to ensure
NO extra spacing below the headings.



Use CSS, e.g. ''h1 { margin-bottom:0; padding-bottom:0; }'', but remember that
some legacy browsers are CSS-deficient, so results are not certain.



"Michael Hill" <mh*****@netzero.net> wrote in message
news:71**************************@posting.google.c om...

Hi, folks.

I am wondering what the HTML standard says regarding the headings
specifiers (h1, h2, h3, etc.). Specifically, I would like to know if
these tags have the browser include a blank line above and below text
included between the, say, <h2></h2> tags.
It''s not a "blank line", it''s a non-zero margin. There is no standard for
these. The default margins of these or any other HTML element are determined
by the default styles applied to those elements by the browser in question.

[snip]

A related question: how can I control this feature; I want to ensure
NO extra spacing below the headings.



Override the default margins with your own in a stylesheet.


On 7 Jun 2004 09:34:18 -0700, mh*****@netzero.net (Michael Hill)
wrote:

Somebody please let me know what the standard says.



Go and read the damn thing.
http://www.w3.org/TR/html4

And it isn''t a blank line, it''s a margin spacing. Try Lie and Bos for
a decent CSS introduction book.

--
Smert'' spamionam


这篇关于标题(h1,h2,h3等)规格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆