与标题相关的HTML问题 [英] Heading-related HTML issues

查看:47
本文介绍了与标题相关的HTML问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

http://members.shaw.ca/davepatton/gps.html


在另一个新闻组(与GPS相关)中,关于

上面的页面,有人说:

------------------------------------------------- ---------------------

该页面有一个非常神秘的标题:CIS:GPS。我将URL保存在我的

浏览器中,但将标题更改为Patton'的GPS页面。


标题相当杂乱无章。例如,第一个(On

This Page)是第三级标题(< h3>),看起来很奇怪

,因为它没有'不属于< h2> ;.


距离页面一小段距离,概述是一个第一级标题。

下面是标题,我认为它们应该是b $ b b标题,例如GPS资源。但是,它们只是普通的文字。

我认为链接肯定应该是一个标题,因为在页面顶部有一个链接

跳转到这一部分。

---------- -------------------------------------------------- ----------


CIS是指我公司的姓名首字母,我同意我应该改变它 - 可能是Patton之类的东西?


< bt的原因; h3>本页:< / h3>靠近

页面的顶部是原来导航菜单位于

HTML的底部,但是在没有CSS支持的情况下查看时,它意味着导航

菜单位于页面底部,因此我将其移至

HTML的顶部,而不更改标题结构:-(


我想更改我的某些页面上出现在

上的第一级概述标题,因为他们自己没有提供

任何上下文(例如搜索引擎索引)。在上面的页面上,

可能类似GPS信息概述会更好吗?


" GPS资源"标记为:

< div class =" heading1">< a name =" resources"> GPS Resources< / a>< / div>

而不是,例如,作为第二级标题。我不记得

正是为什么我这样做,但那是在我的时候w ^作为学习CSS,

并且可能并非正确的做事方式。


任何人都愿意提供任何建议,无论是关于正确

如何构建页面/标题或我网站上的任何其他内容?

谢谢


-

Dave Patton

加拿大协调员,学位合流项目
http://www.confluence.org/

我的网站: http://members.shaw.ca/davepatton/

http://members.shaw.ca/davepatton/gps.html

In another newsgroup(related to GPS), in regards to
the above page, someone said:
----------------------------------------------------------------------
That page has quite a cryptic title: "CIS: GPS". I saved the URL in my
browser but changed the title to "Patton''s GPS pages".

The headings are rather haphazard. For example, the first one ("On
This Page") is a third level heading (an <h3>), which looks strange
because it doesn''t fall under an <h2>.

A little distance down the page, "Overview" is a first level heading.
Below that are titles which to me look like they deserve to be
headings, e.g., "GPS resources". However, they''re just ordinary text.
I think "Links" definitely should be a heading, since there''s a link
at the top of the page to jump to this section.
----------------------------------------------------------------------

The "CIS" refers to the initials of my company, and I agree I should
change it - maybe to something like "Patton"?

The reason for the <h3>On This Page:</h3> being near the top of the
page was that originally the navigation menu was at the bottom of the
HTML, but when viewed without CSS support, it meant the navigation
menu was at the bottom of the page, so I moved it to the top of the
HTML, without making changes to the heading structure :-(

I want to change the first level "Overview" headings that appear on
some of my pages, because, taken by themselves, they don''t provide
any context(e.g. to search engine indexing). On the above page,
maybe something like "GPS Information Overview" would be better?

"GPS Resources" is marked up as:
<div class="heading1"><a name="resources">GPS Resources</a></div>
rather than, for example, as a second level heading. I can''t recall
exactly why I did that, but it was at the time I was learning CSS,
and probably isn''t "the correct way to do things".

Anyone care to offer any suggestions, either about the proper
way to structure the page/headings, or anything else on my site?
Thanks

--
Dave Patton
Canadian Coordinator, Degree Confluence Project
http://www.confluence.org/
My website: http://members.shaw.ca/davepatton/

推荐答案

Dave Patton写道:
Dave Patton wrote:
http://members.shaw.ca/davepatton/gps .html

< snip>页面结构说明< / snip>

任何人都愿意提供任何有关正确的建议
如何构建页面/标题或我网站上的任何其他内容?
谢谢
http://members.shaw.ca/davepatton/gps.html
<snip>Description of page structure</snip>
Anyone care to offer any suggestions, either about the proper
way to structure the page/headings, or anything else on my site?
Thanks




这很简单。在一张纸上写下你想要为你标题的结构。把它写在一个heirachy中,这样你就可以看到每个标题所用的
等级。


从文档标题开始,这是标题1.然后,列出下面的所有

部分标题,缩进一级。然后重复子

标题。

例如:


CIS(< h1>)

概述(< h2>)

子标题1(< h3>)

子标题2(< h3>)

全球定位系统(< h2>)

在本网站(< h2>)


这可能不准确,我没有阅读全部内容,所以我不知道
了解正确的结构。仅用作指南。


您可以将站点导航放在顶部或底部。无论是

方式,请确保包含跳过链接以跳至内容或跳至

导航,具体取决于它是在顶部还是底部。您可以使用CSS隐藏

这个跳过链接,但是当文档没有样式时它是可见的。


你找到了你之后''结构,使用

正确的标题元素标记它。在< div>中包装每个标题及其相关内容

。 CSS Zen Garden就是这样做的,我在我的网站上这样做。

所以你应该得到这样的代码。

< body id =" cis" ;>

< div id =" container">

< h1>< acronym title =" C?一世? S?"> CIS< / acronym>< / h1>

<! - 填写标题属性中的CIS代表 - >

< p>内容......

< div>

< h2>概述< / h2>

< p> content ...< / p>

< div>

< h3> Sub Heading 1< / h3>

< p> content ...< / p>

< / div>

< div>

< h3>子标题2< / h3>

< p>内容...< / p>

< / div>

< / div>

< div>

< h2>全球定位系统< / h2>

< p>内容......< ; / p>

< / div>

< div>

< h2>在此网站< / h2>

< ul>

< li>菜单项...< / li>

< / ul>

< / div>

< / div>

< / body>


当你''重做,验证你的页面,无线大纲选项

已选中。大纲应该与您构建

标题的方式相匹配。此链接将验证您当前的站点,并在结尾显示

标题结构大纲。
http://validator.w3.org/check?uri=ht...ne=1&verbose=1


-

Lachlan Hunt
http://www.lachy .id.au /
la **** ****** @ lachy.id.au.update.virus.scan ners


删除.update.virus.scanners给我发电子邮件,

没有垃圾邮件和没有病毒!!!



This is easy. Write down, on a piece of paper, the structure you
want for you headings. Write it in a heirachy, so that you can see what
level each heading is at.

Start with the document title, this is heading 1. Then, list all the
section headings below that, indented one level. Then repeat for sub
headings.
For example:

CIS (<h1>)
Overview (<h2>)
Sub Heading 1 (<h3>)
Sub Heading 2 (<h3>)
Global Positioning System (<h2>)
At this Site (<h2>)

This may not be accurate, I didn''t read the whole content, so I don''t
understand the correct structure. Use it as a guide only.

You can either put the site navigation at the top or bottom. Either
way, be sure to include a skip link to either skip to content or skip to
navigation, depending whether it''s at the top or bottom. You can hide
this skip link with CSS, but it''s visible when the document is not styled.

After you''ve worked out you''re structure, mark it up using the
correct heading elements. Wrap each heading and its associated content
within a <div>. The CSS Zen Garden does this, and I do it on my site.
So you should end up with some code like this.
<body id="cis">
<div id="container">
<h1><acronym title="C? I? S?">CIS</acronym></h1>
<!-- Fill in whatever CIS stands for in the title attribute -->
<p>content...
<div>
<h2>Overview</h2>
<p>content...</p>
<div>
<h3>Sub Heading 1</h3>
<p>content...</p>
</div>
<div>
<h3>Sub Heading 2</h3>
<p>content...</p>
</div>
</div>
<div>
<h2>Global Positioning System</h2>
<p>content...</p>
</div>
<div>
<h2>At this Site</h2>
<ul>
<li>menu items...</li>
</ul>
</div>
</div>
</body>

When you''re done, validate you''re page, with the outline option
selected. The outline should match the way you''ve structured your
headings. This link will validate you''re current site, and show the
heading structure outline at the end.
http://validator.w3.org/check?uri=ht...ne=1&verbose=1

--
Lachlan Hunt
http://www.lachy.id.au/
la**********@lachy.id.au.update.virus.scanners

Remove .update.virus.scanners to email me,
NO SPAM and NO VIRUSES!!!


Lachlan Hunt写道:
Lachlan Hunt wrote:
Dave Patton写道:
Dave Patton wrote:
http: //members.shaw.ca/davepatton/gps.html
< snip>页面结构说明< / snip>
http://members.shaw.ca/davepatton/gps.html
<snip>Description of page structure</snip>
任何人都愿意提供任何建议,关于构建页面/标题的正确方法,还是我网站上的其他任何内容?
谢谢
Anyone care to offer any suggestions, either about the proper
way to structure the page/headings, or anything else on my site?
Thanks



[snip]之后你已经解决了你的结构,使用
正确的标题元素进行标记。在< div>中包装每个标题及其相关的内容。 CSS Zen Garden就是这样做的,我在
我的网站上这样做。


[snip] After you''ve worked out you''re structure, mark it up using the
correct heading elements. Wrap each heading and its associated
content within a <div>. The CSS Zen Garden does this, and I do it on
my site.



[snip]


有趣。我从来没有考虑过这样包装*所有*标题+内容。


但是,我经常这样做以进行更深层的嵌套,然后我使用以下

规则。它缩进标题+内容。当它嵌套时,它会逐步工作。

课程。它可以使视觉上更清晰的结构,而不仅仅是

依赖于不同的标题样式:


div.section {

margin-left:3em;

}


-

Barry Pearson
http://www.Barry.Pearson.name/photography/
< a rel =nofollowhref =http://www.BirdsAndAnimals.info/target =_ blank> http://www.BirdsAndAnimals.info/
http://www.ChildSupportAnalysis.co.uk/


[snip]

Interesting. I''ve never considered wrapping *all* headers+content this way.

However, I often do this for deeper nesting, and I then use the following
rule. It indents the header+content. It works progressively when nested, of
course. It can make it visually clearer what the structure is, without just
relying on different styles for the headers:

div.section {
margin-left: 3em;
}

--
Barry Pearson
http://www.Barry.Pearson.name/photography/
http://www.BirdsAndAnimals.info/
http://www.ChildSupportAnalysis.co.uk/



" Lachlan Hunt" < LA ********** @ lachy.id.au.update.virus.scanners>写在

消息新闻:在************** @ news-server.bigpond.net.au ...

"Lachlan Hunt" <la**********@lachy.id.au.update.virus.scanners> wrote in
message news:on**************@news-server.bigpond.net.au...
戴夫Patton写道:
Dave Patton wrote:
http://members.shaw .ca / davepatton / gps.html
< snip>页面结构说明< / snip>
http://members.shaw.ca/davepatton/gps.html
<snip>Description of page structure</snip>
任何人都愿意提供任何建议,无论是关于正确的方法来构建页面/标题或我网站上的任何其他内容?
谢谢
Anyone care to offer any suggestions, either about the proper
way to structure the page/headings, or anything else on my site?
Thanks



这很容易。在一张纸上写下你想要的结构标题。把它写成一个heirachy,这样你就可以看到每个标题的等级。



This is easy. Write down, on a piece of paper, the structure you
want for you headings. Write it in a heirachy, so that you can see what
level each heading is at.



[snip]

之后你已经找出你的结构,用
正确的标题元素标记它。在< div>中包装每个标题及其相关内容
。 CSS Zen Garden就是这样做的,我在我的网站上这样做。
所以你应该得到这样的代码。
< body id =" cis">
< ; div id =" container">
< h1>< acronym title =" C?一世? S?"> CIS< / acronym>< / h1>
<! - 在标题属性中填写CIS代表的任何内容 - >
< p>内容.. 。
< div>
< h2>概述< / h2>
< p>内容......< / p>
< div>
< h3> Sub Heading 1< / h3>
< p> content ...< / p>
< / div>
< div>
< h3> Sub Heading 2< / h3>
< p>内容......< / p>
< / div>
< / div>
< div>
< h2>全球定位系统< / h2>
< p>内容......< / p>
< / div>
< ; div>
< h2>在此网站< / h2>
< ul>
< li>菜单项...< / li> ;
< / ul>
< / div>
< / div>
< / body>


[snip]
After you''ve worked out you''re structure, mark it up using the
correct heading elements. Wrap each heading and its associated content
within a <div>. The CSS Zen Garden does this, and I do it on my site.
So you should end up with some code like this.
<body id="cis">
<div id="container">
<h1><acronym title="C? I? S?">CIS</acronym></h1>
<!-- Fill in whatever CIS stands for in the title attribute -->
<p>content...
<div>
<h2>Overview</h2>
<p>content...</p>
<div>
<h3>Sub Heading 1</h3>
<p>content...</p>
</div>
<div>
<h3>Sub Heading 2</h3>
<p>content...</p>
</div>
</div>
<div>
<h2>Global Positioning System</h2>
<p>content...</p>
</div>
<div>
<h2>At this Site</h2>
<ul>
<li>menu items...</li>
</ul>
</div>
</div>
</body>




这非常有道理。它将一个真正的层次结构应用于页面,而不是仅仅通过标题

元素和段落的交替隐含的结构。它有助于简单灵活的样式,并且

可以促进某些功能的实现,偶尔可能需要在客户端脚本中编码。



This makes eminently good sense. It applies a real hierarchical structure to
the page, rather than one that is only implied by the alternation of heading
elements and paragraphs. It lends itself to easy and flexible styling, and
can facilitate the implementation of certain features one might occasionally
want to code in client-side script.


这篇关于与标题相关的HTML问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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