Heading structure

  • Thread starter Luigi Donatello Asero
  • Start date
R

Richard

Hello,
May I use a heading structure of the following kind?

You can use any combination of <h[n]> you'd like.
The tag only specifically assigns a set definition to a certain phrase or
word.
Instead of the need to style the phrase or word.
 
B

Beauregard T. Shagnasty

Luigi said:

If I could read the language ... <hx> needs planning.

<h1>Main Page Heading, Used Once</h1>
<h2>Sub-heading One</h2>
<h2>Sub-heading Two</h2>
<h3>Sub-sub-heading One</h3>
<h3>Sub-sub-heading Two</h3>
<h3>Sub-sub-heading Three</h3>
<h2>Sub-heading Three</h2>
<h3>Sub-sub-heading One</h3>
<h4>Sub-sub-sub-heading One</h4>
<h3>Sub-sub-heading Two</h3>
....
Consider it similar to an Outline.
 
L

Leif K-Brooks

Richard said:
Hello, May I use a heading structure of the following kind?

You can use any combination of <h[n]> you'd like.

In W3C HTML, that is. ISO HTML, the only HTML standard created by a real
standards organization, doesn't let you skip heading levels (so you
can't do said:
The tag
Element.

only specifically assigns a set definition to a certain phrase or
word. Instead of the need to style the phrase or word.

I fail to see the connection between assigning semantic meaning to an
element and not needing to style it.
 
L

Luigi Donatello Asero

Leif K-Brooks said:
Richard said:
Hello, May I use a heading structure of the following kind?

You can use any combination of <h[n]> you'd like.

In W3C HTML, that is. ISO HTML, the only HTML standard created by a real
standards organization, doesn't let you skip heading levels (so you
can't do <h1> immediately followed by <h3>).

I do not think that I put any <h3> directly after <h1>
Did you look at the code?
I also used <div class="" id="">
and so on.
 
L

Luigi Donatello Asero

Beauregard T. Shagnasty said:
If I could read the language ... <hx> needs planning.

<h1>Main Page Heading, Used Once</h1>
<h2>Sub-heading One</h2>
<h2>Sub-heading Two</h2>
<h3>Sub-sub-heading One</h3>
<h3>Sub-sub-heading Two</h3>
<h3>Sub-sub-heading Three</h3>
<h2>Sub-heading Three</h2>
<h3>Sub-sub-heading One</h3>
<h4>Sub-sub-sub-heading One</h4>
<h3>Sub-sub-heading Two</h3>
...
Consider it similar to an Outline.


It is already similar.
But I also have links on the top.
 
B

Beauregard T. Shagnasty

Luigi said:
It is already similar.
But I also have links on the top.

Where, above the <h1>? I suppose it's ok to put navigation above it...

But what is this?
<div id="head"><h1>Översättning svenska - tyska - engelska -
italienska</h1></div>

Why is the <h1> in a <div> by itself?
 
L

Luigi Donatello Asero

Beauregard T. Shagnasty said:
Where, above the <h1>? I suppose it's ok to put navigation above it...


No. It is not above the head.
http://www.scaiecat-spa-gigi.com/sv/hus-i-italien.php
But what is this?
<div id="head"><h1>Översättning svenska - tyska - engelska -
italienska</h1></div>

Why is the <h1> in a <div> by itself?


I think you can have a style for the <h1> if you want to
This way I make it clear that the heading is for the whole page and not
only for the menu.
 
B

Beauregard T. Shagnasty

Luigi said:
I think you can have a style for the <h1> if you want to This way
I make it clear that the heading is for the whole page and not
only for the menu.

Yes, certainly you may style the <h1>. But why use the superfluous <div>?

h1 {
/* styles here */
}

As there should only be one <h1>, it becomes obvious that this heading
is "for the whole page" and not for a menu.
 
B

Beauregard T. Shagnasty

Luigi said:
"Beauregard T. Shagnasty" <[email protected]> skrev i
meddelandet news:[email protected]...

Well. on the page
http://www.w3.org/TR/REC-html40/struct/global.html#h-7.5.5 there is
an example where the DIV element associates a heading with the
following section.

Yes, but...

<DIV class="section" id="forest-elephants" >
<H1>Forest elephants</H1>
<P>In this section, we discuss the lesser known forest elephants.
....this section continues...
<DIV class="subsection" id="forest-habitat" >
<H2>Habitat</H2>
<P>Forest elephants do not live in trees but among them.
....this subsection continues...
</DIV>
</DIV> <-- end of <DIV class="section" ...

Notice how in the sample, the first DIV does not end until the end of
the sample, most likely place would be to encompass everything except
navigation.

Your div is solely wrapped around the <h1> element, and not like this
sample.
 
L

Luigi Donatello Asero

Beauregard T. Shagnasty said:
Yes, but...

<DIV class="section" id="forest-elephants" >
<H1>Forest elephants</H1>
<P>In this section, we discuss the lesser known forest elephants.
...this section continues...
<DIV class="subsection" id="forest-habitat" >
<H2>Habitat</H2>
<P>Forest elephants do not live in trees but among them.
...this subsection continues...
</DIV>
</DIV> <-- end of <DIV class="section" ...

Notice how in the sample, the first DIV does not end until the end of
the sample, most likely place would be to encompass everything except
navigation.

Your div is solely wrapped around the <h1> element, and not like this
sample.



No, it is not. But I suppose it is better to put one <div> more rather than
one less.
 
B

Beauregard T. Shagnasty

Luigi said:
No, it is not. But I suppose it is better to put one <div> more
rather than one less.

It was the last time I looked. (I cannot see if you changed it; your
server is down at the moment.) I even quoted it:

<div id="head"><h1>Översättning ...[trim] - italienska</h1></div>

See the <div> at the beginning and the </div> at the end? This does
not conform to the sample at the W3C page.
 
L

Luigi Donatello Asero

Beauregard T. Shagnasty said:
It was the last time I looked. (I cannot see if you changed it; your
server is down at the moment.) I even quoted it:

I do not have my own server, my site is on a webhost.
By the way, I am not very satisfied with the webhost where my site is now,
so I may consider some suggestions about other hosts in the future
But it should be a host which installs server certificate on the server (
not all hosts seem to do that).
The webhost should be preferably in a country within the European Union.

But the
<div id="head"><h1>Översättning ...[trim] - italienska</h1></div>

See the <div> at the beginning and the </div> at the end? This does
not conform to the sample at the W3C page.



Well, actually I am not sure whether it does but just because I am not, I
suppose that it is better to put it rather than not, just now.
When I said one more I did not mean just the closing tag.
 
R

Richard

Hello, May I use a heading structure of the following kind?
You can use any combination of <h[n]> you'd like.
In W3C HTML, that is. ISO HTML, the only HTML standard created by a
real
standards organization, doesn't let you skip heading levels (so you
can't do <h1> immediately followed by <h3>).

<h1>aaaaaaaaaaaaaaa<h3>bbbbbbbbbbbb</h3>aaaaaaaa</h1>
This produces 3 lines of printed text rather than one.
As the header tag produces a dual line break at the closure.
I fail to see the connection between assigning semantic meaning to an
element and not needing to style it.

What if you had a sentence in which you wanted to show in different size
print, a specific word?
You could not use an <h> tag due to the inherit nature of the tag.
 
R

Richard

Richard said:
Hello,
May I use a heading structure of the following kind?
You can use any combination of <h[n]> you'd like.
The tag only specifically assigns a set definition to a certain phrase
or
word.
Instead of the need to style the phrase or word.

What about these examples?
https://www.scaiecat-spa-gigi.com/sv/oversattning.html
and
https://www.scaiecat-spa-gigi.com/sv/oversattning.php


That's fine. That's what the <h> tags are for.
 
D

Duende

While sitting in a puddle Richard scribbled in the mud:
What if you had a sentence in which you wanted to show in different size
print, a specific word?
You could not use an <h> tag due to the inherit nature of the tag.

What nature would that be?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Proper headings 19
Help with code 0
HTML::TreeBuilder issue 6
<H3> <H4> 3
Grouping and bypassing links 3
Title of a table with CSS 5
Determining document structure 5
Help with my responsive home page 2

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top