Heading structure

  • Thread starter Luigi Donatello Asero
  • Start date
B

Beauregard T. Shagnasty

Luigi said:
I do not have my own server, my site is on a webhost.

The server that you rent space on. You know what I mean.
<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.

I'm sorry, I don't understand Swedish. Was that Swedish?

And you still have the redundant <div>'s around your <h1>.
 
T

Toby Inkster

Richard said:
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.

Do you mean that you believe you can't do this?

<h1 style="font-size:9px">Tiny text (probably)</h1>
 
T

Toby Inkster

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

It's not needed, but can be handy for styling.

<div id="head"><h1>Foobar</h1></div>

#head {
background: blue url("foo") no-repeat scroll center left;
}
h1 {
background: transparent url("bar") no-repeat scroll center right;
text-align: center;
padding: 0.33em 60px 0.67em;
margin: 0;
}

.... will display the heading "Foobar" with a picture of a Foo to the left
of the heading, and a picture of a Bar to the right, all on a blue
background.
 
B

Beauregard T. Shagnasty

Toby said:
It's not needed, but can be handy for styling.

Yup, I know that. csszengarden does things like that. But Luigi
doesn't have any fancy styles on his headings. <g>
 
O

Oli Filth

Richard said:
<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.

You can't do this in HTML 4.01 full-stop. Nesting said:
<h1> is a tag.

Yes, but <h1> on its own is useless. You need <h1>some text</h1>, in
which case this is an element.
 
R

R2G2

Please look up the definition of "typo".

Really didn't mean that to be sarcastic, just wasn't sure if that
would work if he had closed <h1> with </h2> - I know I've had typos in
my html that stop it from working correctly
 
L

Luigi Donatello Asero

Beauregard T. Shagnasty said:
Luigi said:
I do not have my own server, my site is on a webhost.

The server that you rent space on. You know what I mean.
<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.

I'm sorry, I don't understand Swedish. Was that Swedish?

The content of the heading?
Yes.
 
L

Luigi Donatello Asero

Beauregard T. Shagnasty said:
Yup, I know that. csszengarden does things like that. But Luigi
doesn't have any fancy styles on his headings. <g>

But if you have a <div> for the header you still have the possibility to
style the heading as
Toby did in his example.
 
B

Beauregard T. Shagnasty

Luigi said:
But if you have a <div> for the header you still have the
possibility to style the heading as Toby did in his example.

But why bother unless you are going to actually do that?
 

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,776
Messages
2,569,603
Members
45,191
Latest member
BuyKetoBeez

Latest Threads

Top