Inline Underlining in XHTML Strict?

K

Kelwin Delaunay

Hi,

Is there a way to produce underlined text within a sentence in xhtml strict?

Thanks,
Kelwin
 
J

Jukka K. Korpela

Kelwin Delaunay said:
Is there a way to produce underlined text within a sentence in xhtml
strict?

Maybe. What does underlining mean in speech, or in Braille? You might
just as well have asked how to produce red text in XHTML Strict, or how
to make some words spoken in female voice, or how to make some words have
a sweet odour in XHTML Strict.

Try explaining the real problem in context. As usual, a URL is virtuallu
indispensable. Since we know that links, and only links, should normally
be underlined on Web pages, and since links are usually underlined by
default, and if not then there's probably a good reason why not, what
might justify an attempt to deviate from this? And why would you use
XHTML Strict?
 
K

Kelwin Delaunay

Jukka K. Korpela said:
Maybe. What does underlining mean in speech, or in Braille? You might
just as well have asked how to produce red text in XHTML Strict, or how
to make some words spoken in female voice, or how to make some words have
a sweet odour in XHTML Strict.

Try explaining the real problem in context. As usual, a URL is virtuallu
indispensable. Since we know that links, and only links, should normally
be underlined on Web pages, and since links are usually underlined by
default, and if not then there's probably a good reason why not, what
might justify an attempt to deviate from this? And why would you use
XHTML Strict?

I simply wanted to use the standard convention: a book title appearing in
text is underlined. I've worked around the problem by using <u> and XHTML
Transitional, but was looking for an answer in Strict. Why not use Strict if
the W3C is trying to take us there? Here's the page:
http://webpages.charter.net/maverickbyconscience/index.htm . The text in
question is very near the bottom.

Kelwin
 
S

SpaceGirl

Kelwin Delaunay said:
I simply wanted to use the standard convention: a book title appearing in
text is underlined. I've worked around the problem by using <u> and XHTML
Transitional, but was looking for an answer in Strict. Why not use Strict if
the W3C is trying to take us there? Here's the page:
http://webpages.charter.net/maverickbyconscience/index.htm . The text in
question is very near the bottom.

Kelwin


The thing is, you shouldn't be underlining *anything* unless it's a
hyperlink.
 
B

Beauregard T. Shagnasty

Quoth the raven named Kelwin Delaunay:
I simply wanted to use the standard convention: a book title
appearing in text is underlined. I've worked around the problem by
using <u> and XHTML Transitional, but was looking for an answer in
Strict. Why not use Strict if the W3C is trying to take us there?
Here's the page:
http://webpages.charter.net/maverickbyconscience/index.htm . The
text in question is very near the bottom.

While I agree with Jukka about only underlining links, if you must
underline your titles, try this:

..uline { text-decoration: underline; }

<p>... NY Times bestseller list: <span class="uline">"Deliver Us from
Evil ... </span> ...

It passes W3C XHTML 1.0 Strict at a page of mine.
 
K

Kelwin Delaunay

Beauregard T. Shagnasty said:
While I agree with Jukka about only underlining links, if you must
underline your titles, try this:

.uline { text-decoration: underline; }

<p>... NY Times bestseller list: <span class="uline">"Deliver Us from
Evil ... </span> ...

It passes W3C XHTML 1.0 Strict at a page of mine.

Thank you for your help.
Kelwin
 
S

Steve Pugh

Kelwin Delaunay said:
I simply wanted to use the standard convention: a book title appearing in
text is underlined.

Is it? I thought that italics were the convention in those media that
are capable of displaying them.
I've worked around the problem by using <u> and XHTML
Transitional, but was looking for an answer in Strict.

<cite class="book">Gone with the Wind</cite>

cite.book {text-decoration: underline; font-style: italic;}
Here's the page:
http://webpages.charter.net/maverickbyconscience/index.htm . The text in
question is very near the bottom.

And I instantly moved my mouse over it, even though I'd read these
posts and knew it wasn't a link. Reserve underlining for links.

BTW, why isn't the other book title on that page also marked in the
same way?

Steve
 
K

Kyle James Matthews

Steve said:
Is it? I thought that italics were the convention in those media that
are capable of displaying them.

This is true. Italics are the way to go. Underlining book titles is looked
down upon in some academic circles these days.


Kyle
 
T

Toby A Inkster

This is true. Italics are the way to go. Underlining book titles is looked
down upon in some academic circles these days.

Indeed underlining was only "invented" as a way for authors to mark which
parts of a book to print in italics on a manuscript before sending it off
to the printer.
 
K

Kelwin Delaunay

Thanks to all for your help. Italics it is. All revised and and validates as
XHTML strict.

Kelwin
 
K

Karl Groves

Kelwin Delaunay said:
Thanks to all for your help. Italics it is. All revised and and validates as
XHTML strict.

Kelwin

Who are you talking to?
Please quote when you reply.

-karl
 
K

Kelwin Delaunay

Karl Groves said:
validates

Who are you talking to?
Please quote when you reply.

-karl

Well, I thought that "all for your help" was pretty clear because that's all
there is in this thread, but then yours is not the first rude post in this
thread, either.

Kelwin
 
K

Karl Groves

Kelwin Delaunay said:
Well, I thought that "all for your help" was pretty clear because that's all
there is in this thread, but then yours is not the first rude post in this
thread, either.

First day on Usenet, huh?

-Karl
 
K

Kelwin Delaunay

Karl Groves said:
First day on Usenet, huh?

-Karl

Nah, I just never get used to the idea that there are some people everywhere
with nothing better to do than practice their best riff of boorish.

Kelwin
 
K

Karl Groves

Kelwin Delaunay said:
Nah, I just never get used to the idea that there are some people everywhere
with nothing better to do than practice their best riff of boorish.

At least you're quoting properly now.

-Karl
 
M

Mark Parnell

At least you're quoting properly now.

Except for the bit about trimming it down to only the necessary bits.
But then, you're not doing that either, Karl. :)
 
K

Karl Groves

Mark Parnell said:
Except for the bit about trimming it down to only the necessary bits.
But then, you're not doing that either, Karl. :)

'tis true!
I got a bad habit of that.
Eric Meyer even yelled at me for that once! ;-)

-Karl
 
Joined
Sep 16, 2009
Messages
1
Reaction score
0
Jukka K. Korpela said:
Maybe. What does underlining mean in speech, or in Braille? You mightjust as well have asked how to produce red text in XHTML Strict, or how to make some words spoken in female voice, or how to make some words have a sweet odour in XHTML Strict.

What on earth is wrong with some of you people?
The poor guy asked a really simple question. Can you underline text in XHTML strict anymore, because you COULD in HTML using the u tag.

So the answers are either.. "Yes you can, with THIS tag..." or "No you can't, but the work-around is THIS..".

The problem with some of you guys is that you're so lost in your techy world that you forget that sometimes the simplest answer is necessary and your junk-heaped replied just cause complication.

An underline CAN or can be used to emphasise text that has a special meaning compared to it's normally non-emphasised equivalent. The problem in HTML is that hyperlinks are defaulted to underlined so there may be a slight confusion.

BUT, (But) let's not forget that by default, hyperlinks are bright blue. So if you underline your normal text, people shouldn't be getting it confused with your default bright blue underlined hyperlink. If your underlined text is getting mixed up with your hyperlinks then that's just bad design by the developer because they've been changing colours.

Yes, italic is apparently the "best" way to emphasise text, but you will find lots of different opinions on this by academics. There is even the suggest that italic and underlined emphasis can have two different types of meaning.

But hey!, let's not get complicated.
If you want your emphasis to look underlined and not italic just use the EM tag and inside it but the class 'underline'.

Code:
<em class='underline'>My emphasised word</em>

Then, as mentioned, created a class .underlined and apply appropriate text-decoration.
That way it's coded correctly in the sense that HTML identifies this word as emphasis and it also means you get to paint it how you want.
 
Last edited:

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,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top