"Subtitle" / Description

S

shapper

Hello,

I would like to display something like:

Contact
find all answers to your questions
$Some text$

I was using:
<h2>Contact<span>find all answers to your questions</span></h2>
<p>Some Text</p>

However, when checking in Opera Table of contents it shows:
"Contact find all answers to your questions"

It sounds strange to me ...

Should I use, instead, something as follows:
<h2>Contact</h2>
<p class="description">find all answers to your questions</p>
<p>Some Text</p>

Or any other suggestion you might have ...

Thanks,
Miguel
 
J

Jukka K. Korpela

shapper said:
I would like to display something like:

Contact
find all answers to your questions
$Some text$

What's the problem with that?
I was using:
<h2>Contact<span>find all answers to your questions</span></h2>
<p>Some Text</p>
Why?

However, when checking in Opera Table of contents it shows:
"Contact find all answers to your questions"

Well, if you declare it as 2nd level heading, why don't you want it to be
treated like one?
Should I use, instead, something as follows:
<h2>Contact</h2>
<p class="description">find all answers to your questions</p>

Is "Contact" alone a 2nd level heading? Sounds odd? Is "find all answers to
your questions" a paragraph of text?
Or any other suggestion you might have ...

Try revealing the real content. Maybe the structure can be derived from it.
Or describe it in logical terms, then the desired visual appearance.
 
C

C A Upsdell

shapper said:
Hello,

I would like to display something like:

Contact
find all answers to your questions
$Some text$

I was using:
<h2>Contact<span>find all answers to your questions</span></h2>
<p>Some Text</p>

However, when checking in Opera Table of contents it shows:
"Contact find all answers to your questions"

First, make sure your HTML and CSS is valid: coding errors can have
weird results.

If the problem persists, post back with a URL.
 
A

Adrienne Boswell

Gazing into my crystal ball I observed shapper <[email protected]>
writing in @v20g2000vbs.googlegroups.com:
Hello,

I would like to display something like:

Contact
find all answers to your questions
$Some text$

I was using:
<h2>Contact<span>find all answers to your questions</span></h2>
<p>Some Text</p>

However, when checking in Opera Table of contents it shows:
"Contact find all answers to your questions"

It sounds strange to me ...

Should I use, instead, something as follows:
<h2>Contact</h2>
<p class="description">find all answers to your questions</p>
<p>Some Text</p>

Or any other suggestion you might have ...

If the sentence makes sense out of context, then it's good to go. Does
"Contact find all answers to your questions" make sense out of context?
Maybe <h2>Contact Us <span>and find all answers to your questions</span>
</h2> sounds better?
 
R

richard

Hello,

I would like to display something like:

Contact
find all answers to your questions
$Some text$

I was using:
<h2>Contact<span>find all answers to your questions</span></h2>
<p>Some Text</p>

However, when checking in Opera Table of contents it shows:
"Contact find all answers to your questions"

It sounds strange to me ...

Should I use, instead, something as follows:
<h2>Contact</h2>
<p class="description">find all answers to your questions</p>
<p>Some Text</p>

Or any other suggestion you might have ...

Thanks,
Miguel

Why are you span-ing the text?
If you want the text spanned on a second line, then use <br>.

<h2>Contact</h2>
<br>
line of text here.
 
A

Adrienne Boswell

Why are you span-ing the text?
If you want the text spanned on a second line, then use <br>.

<h2>Contact</h2>
<br>
line of text here.

You might have something like:

<h2>Heading<br>
<span>Subtitle</span>
</h2>

and h2 span might be a smaller font. That's why.
 
J

Jukka K. Korpela

Adrienne said:
- -
If the sentence makes sense out of context, then it's good to go.

I think the crucial question is whether a piece of text makes a good
heading, or at least a heading at all.
Does "Contact find all answers to your questions" make sense out of
context?

I don't it does, but the content is here really
"Contactfind all answers to your questions"
which makes even less sense. (And that's how good search engines "see" the
text.)

The <span> markup does not imply any semantics, and it does not constitute a
word break at the start of the element.
 
S

shapper

I think the crucial question is whether a piece of text makes a good
heading, or at least a heading at all.


I don't it does, but the content is here really
"Contactfind all answers to your questions"
which makes even less sense. (And that's how good search engines "see" the
text.)

The <span> markup does not imply any semantics, and it does not constitute a
word break at the start of the element.

This is more of a semantics question. On my example I have:

<h2>Contact<span>find all answers to your questions</span></h2>

What I am trying to say is:

"Contact" >> This is the page title
"Here you can find all answers to your questions" >> a preview of
what the information of the page will give you.

Another example:
"Products"
"Find the right product for you"

In my opinion "Find the right product for you" does not belong to the
Title.
And it is not a subtitle either ...

A subtitle, IMHO, would be:
<h2>Products</h2>
<h3 >Boots</h3>
<h3> Jackets</h3>

As follows:

<h2>Products</h2>
<span>Find all kind of products for winter</span>
....
<h3 >Boots</h3>
<span >Looking to wear your feet</span>
....
<h3> Jackets</h3>
<span>Get a warm jacket</span>

And when using Opera's table of contents I would get :

Products
Boots
Jackets

This makes sense to me ... What do you think?
.... The phrases inside span are not part of the title.
Are just a catch up phrase for that title.

Or maybe the catch up phrase could be inside a p tag?

I am first trying to have the right semantics ... then I will care
about the styling.

Thank You,
Miguel
 
J

Jukka K. Korpela


Fullquote down to the sig, always a useful cluelessness indicator.
This is more of a semantics question.

You still haven't said anything about the meaning of markup. Without that,
all that babble about semantics is just, er, "semantics" in the derogatory
sense.

On my example I have:
<h2>Contact<span>find all answers to your questions</span></h2>

I already wrote, and you quoted, that the textual content is then
"Contactfind all answers to your questions"
What I am trying to say is:

"Contact" >> This is the page title
"Here you can find all answers to your questions" >> a preview of
what the information of the page will give you.

You are not saying anything about the intended structure. Just outlining
what you think your text should _look_ like in a primitive rendering
environment, without actually giving any real text.
Another example:
"Products"
"Find the right product for you"

Just words without structure.
In my opinion "Find the right product for you" does not belong to the
Title.

So what's the problem then? Don't put it there.
<span>Find all kind of products for winter</span>

<h3 >Boots</h3>
<span >Looking to wear your feet</span>
...
<h3> Jackets</h3>
<span>Get a warm jacket</span>

This finally seems to make some sense. What you want is markup for a slogan
or advertorial phrase. Well, it's not a paragraph (a normal paragraph is
several sentences long and has more content than a slogan). It's not a
heading either. It's supposed to be self-contained, to work as such, short
and impressive and not a heading for anything - especially when you already
have a heading like "Boots" or "Jackets". What's left is the semantically
empty block container <div>. It's more logical than <span>, which is by
definition inline markup. If the slogan is followed by a paragraph, then the
default rendering is not affected (<span> and <div> would be similar then),
but some day, someone puts e.g. an image right after the slogan, an then it
matters.
Are just a catch up phrase for that title.

You could put it that way... something that associates with a heading,
without itself being a heading - and maybe associates with the following
text, without being a heading for it.
 
S

shapper

What's left is the semantically
empty block container <div>. It's more logical than <span>, which is by
definition inline markup. If the slogan is followed by a paragraph, then the
default rendering is not affected (<span> and <div> would be similar then),
but some day, someone puts e.g. an image right after the slogan, an then it
matters.

That is a problem I always have:
I see a div as a section, a division, a small portion of a page.

For me having a div containing a phrase feels strange to me ...

Can't I use a span and with CSS use "display: block"?

For example, if I need to display the following information for a
professor, which is included in a list:

Name (City)
Email, Phone
Subjects (Subject(s) that the professor lectures)
Levels (Education level(s) that he/she teaches)

An example:
John Smith (Lisbon)
(e-mail address removed), 971122332
Mathematics, Physics and Chemistry
College

Wouldn't make sense to have the following?

<div class="Professor">
<p>John Smith <span class="City">(Lisbon)</span></p>
<p>[email protected], 971122332</p>
<p>Mathematics, Physics and Chemistry</p>
<p>College</p>
</div>
<div class="Professor">
... Other professor
</div>

This is actually an example that I am working and which I am not sure
how to do it and that contains that div/span/p problem.

Maybe you would replace all the p tags by divs?

Thank You,
Miguel
 
J

Jukka K. Korpela

shapper said:
That is a problem I always have:
I see a div as a section, a division, a small portion of a page.

What's the problem with that? It's a division, at block level.
For me having a div containing a phrase feels strange to me ...

Isn't it a division that is inline text?
Can't I use a span and with CSS use "display: block"?

Why would you do that? You would use markup that is by definition
text-level, then do your best to make it look like something else?
<div class="Professor">
<p>John Smith <span class="City">(Lisbon)</span></p>
<p>[email protected], 971122332</p>
<p>Mathematics, Physics and Chemistry</p>
<p>College</p>
</div>

Do you actually read the responses you get? I wrote about paragraphs,
something that is common knowledge that can be checked in dictionaries. Can
you find any definition, even a sloppy and loose one, that classifies e.g.
the word "College" as a _paragraph_ of text?

As an aside, do you really want that a speech browser significantly pauses
between lines of contact information and possibly raises voice at the start
of each line? That's how it could conceivably and usefully render
_paragraphs_ of text - and nothing you say in CSS won't affect it (as you
would not use aural rules in CSS, and even if you did, it would probably get
ignore).
This is actually an example that I am working and which I am not sure
how to do it and that contains that div/span/p problem.

Which problem? The real problem is whether you should use <div> for a line
or just <br> between lines, or maybe a table. And it's not a big issue, as
long as you are consistent
 
S

shapper

Do you actually read the responses you get? I wrote about paragraphs,
something that is common knowledge that can be checked in dictionaries. Can
you find any definition, even a sloppy and loose one, that classifies e.g..
the word "College" as a _paragraph_ of text?

Yes, I read and that is why I posted this example here.
I am doing it wrong ... I now realize it.

So I should do:

<div class="Professor">
John Smith <span class="City">(Lisbon)</span><br />
(e-mail address removed), 971122332<br />
Mathematics, Physics and Chemistry<br />
College
</div>

Or probably in this case use a p as wrapper instead of div? Not?
And when there is a need to change the style on one of these lines I
just wrap it in a span.
As an aside, do you really want that a speech browser significantly pauses
between lines of contact information and possibly raises voice at the start
of each line?

No, I don't. Got it.

Thank You,
Miguel
 

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

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,049
Latest member
Allen00Reed

Latest Threads

Top