How To? : Display text with highlighted background

D

dorayme

"Jukka K. Korpela said:
Actually, it has often been stated and argumented that w3schools is
unreliable and otherwise questionable. ...
Fundamentally bad practices, so don't learn from them.

What JK really meant to add, but just could not get himself to do, is:

"Yes, follow dorayme's advice (which I snipped because the very sight of
this creature's name makes me want to vomit*) to look at the link it
gave you. At least most of the stuff there is sound. It is a bit of a
pity that that website is not in HTML 4.01, so be careful about this
aspect. Ask me more about this if you need to.
 
P

Phonedude

<span> is an HTML element that is used to group inline content (it spans a
set of content). It doesn't have any actual effect on the rendering of the
document, and as such is often used with CSS applied to style part of the
content.

However, as I mentioned in my earlier post, by highlighting, you are -
effectively - emphasising a piece of text, so in that case it may be
better
to use the <em> element with style applied to that.

Thanks, Nigel. I'll explore both tags: <span> and <em> along with an
exploration of CSS.

All the best,
—Thri

I've found this site to be most helpful -- http://htmlhelp.com/reference/
 
D

dorayme

Ed Mullen said:
w3schools.com may not be perfect but it is fundamentally useful and
accurate. Self-appointed Yukka's opinions notwithstanding.

I am not sure if you know Ed, that I recommended htmldog, not the
W3schools. I have sort of taken it on trust that this school site has
mistakes (never much used it meself...) but I am sure you are also right
that it is probably fine for a real big bunch of things.

Also, while I am here, in my capacity as Headmartian of this church of
ours, I urge all the teachers to go a little easy on our young JK who I
have noticed has behaved rather better recently. I am keeping an eye out
on him and I am hoping his progress will continue.

No, it is not that I am in a particularly good mood - though I am - it
is more that I believe firmly that every boy here deserves a chance to
improve and must be encouraged in good behaviour.

"Well done JK" is destined for his term report this semester.
 
D

dorayme

Ed Mullen said:
On the other hand, you are whimsical, pleasant to encounter, difficult
(many times) to understand but always worth a grin.

Blush!

I never mind being challenged to explain (without insinuations about my
mental health or pharmacological intakes*) because it helps me clear my
own thoughts. I have been much bemused recently about how curious my
views about semantic equivalence of ol and some tables must have seemed
to folk. Communication is quite a difficult act across folk with quite
different backgrounds.

------------------------
* Perhaps I should declare my drug use, like athletes are supposed to at
each meet? Let me start now while I am in a special sort of post Olympic
mood. It won't last, I think too many of these startling performances
are helped along by too much taxpayer money frankly...)

Recent Drugs:

28th Aug 2008:

270ML of Penfold's Shiraz Cabernet between 6.30pm and 8PM

1 cup of decaf coffee

2 x 500mg paracetamol at 11.45pm 28th Aug 2008

29th Aug 2008:

6.30am, cup of black tea.

7.45 am: another cup of black tea

9.30am: cup of coffee

12.15 pm: cup of green tea
 
N

Neredbojias

<span style="padding:0 2px;background:#f0f000;color:#504030;">Highlight ed
Text</span>

Thanks, Nered... This worked great.
'Welcome.

If you feel like showing me the syntax for including these attributes:
[face (e.g. verdana)], [size], [itallics], [underscore] and [bold],
I'm all eyeballs!

Well, as others have hinted, it's often better to put css in the head section
or a seperate stylesheet, but here's some inline stuff:

<span style="font-family:Verdana,Arial,sans-serif;font-size:100%;font-
style:italics;font-weight:bold;text-decoration:underline;">Meet me in St.
Louie, Louie.</span>
 
J

John Hosking

Neredbojias said:
On Aug 28, 1:45 pm, Neredbojias wrote:
--------------------------------
<span style="padding:0 2px;background:#f0f000;color:#504030;">Highlight
ed Text</span>
Thanks, Nered... This worked great.
'Welcome.

If you feel like showing me the syntax for including these attributes:
[face (e.g. verdana)], [size], [itallics], [underscore] and [bold],
I'm all eyeballs!

Well, as others have hinted, it's often better to put css in the head section
or a seperate stylesheet, but here's some inline stuff:

<span style="font-family:Verdana,Arial,sans-serif;font-size:100%;font-
style:italics;font-weight:bold;text-decoration:underline;">Meet me in St.
Louie, Louie.</span>

Minor correction: "italics" with an "s" is invalid; you'd want "italic".
Defined in <http://www.w3.org/TR/CSS21/fonts.html#font-styling>.

Also, many of these properties can be combined in a shorthand form, as in:

<span style="font:italic bold 100% Verdana,Arial,sans-serif;
text-decoration:underline;">Meet me in St. Louis, Louis.</span>

Shorthand form described at
<http://www.w3.org/TR/CSS21/fonts.html#font-shorthand>

OP: See that whole page, and then see the rest of the CSS spec for more
such details on usage. And to help check that you haven't mistyped
something as "italics" or "itallic", remember to check your code with
the W3C's validator at <http://jigsaw.w3.org/css-validator/>.
 
J

John Hosking

dorayme said:
Major correction to a minor correction, there is no "italics" without an
"s" on or off the earth.

Ah. How about if I phrase it thusly:

Minor correction: "italics", with an "s", is invalid; you'd want "italic".

Does that obviate a need for major corrections or minor quibbles?
 
J

Jonathan N. Little

dorayme said:
Major correction to a minor correction, there is no "italics" without an
"s" on or off the earth.

??

Italic (î-tàl´îk, ì-tàl´-) adjective
1.Of or relating to ancient Italy or its peoples or cultures.
2.Of or relating to Italic.
3. italic Abbr. ital. Of or being a style of printing type patterned on
a Renaissance script with the letters slanting to the right: This
sentence is printed in italic type.

noun
1.A branch of the Indo-European language family that includes Latin,
Faliscan, Oscan, Umbrian, and other languages or dialects.
2.Often italics Abbr. ital. Italic print or typeface.

[Latin Italicus, from Greek Italikos, from Italia, Italy, from Latin.]

Excerpted from The American Heritage® Dictionary of the English
Language, Third Edition © 1996 by Houghton Mifflin Company. Electronic
version licensed from INSO Corporation; further reproduction and
distribution in accordance with the Copyright Law of the United States.
All rights reserved.
 
D

dorayme

John Hosking said:
Ah. How about if I phrase it thusly:

Minor correction: "italics", with an "s", is invalid; you'd want "italic".

Does that obviate a need for major corrections or minor quibbles?

You are trying to shake off something uncomfortable you know is
shadowing you in this construction. It is a brave attempt. But you are
not quite escaping in spite of doing better.

["italics", with an "s", is invalid; you'd want "italic"]

contains a quibbling mistake, namely the bit before the semicolon. The
bit after the semicolon does not obviate it.

There is a slight implication still that you can have "italics" without
an "s". But you can't of course. You see, John, everything is what it
is. If this were not so, it would threaten a very grave possibility,
namely everything being something else. Please don't make the world edge
closer to this nightmare possibility, I have a terrible fear of it and
trust me, you would not want it either.

The "s" in "italics" is essential to it. Without it, it would be
"italic".

I offer the foregoing to further our quibbling relationship. <g>
 
D

dorayme

"Jonathan N. Little said:
dorayme said:
Major correction to a minor correction, there is no "italics" without an
"s" on or off the earth.

??

Italic (î-tàl´îk, ì-tàl´-) adjective
1.Of or relating to ancient Italy or its peoples or cultures.
2.Of or relating to Italic.
3. italic Abbr. ital. Of or being a style of printing type patterned on
a Renaissance script with the letters slanting to the right: This
sentence is printed in italic type.

noun
1.A branch of the Indo-European language family that includes Latin,
Faliscan, Oscan, Umbrian, and other languages or dialects.
2.Often italics Abbr. ital. Italic print or typeface.

[Latin Italicus, from Greek Italikos, from Italia, Italy, from Latin.]

Excerpted from The American Heritage® Dictionary of the English
Language, Third Edition © 1996 by Houghton Mifflin Company. Electronic
version licensed from INSO Corporation; further reproduction and
distribution in accordance with the Copyright Law of the United States.
All rights reserved.

Scholasticism gone mad in the 21st Century! <g>

Nowhere in this whole excerpt of yours does it show how "italics" has no
"s"

You can see the "s" right there before your eyes! Every single "italics"
that has ever existed or exists now or will exist, had, has, will have
"s". Even God cannot make this untrue, so your American Heritage
Dictionary certainly cannot.
 
J

John Hosking

dorayme said:
You are trying to shake off something uncomfortable you know is
shadowing you in this construction.

"in this construction" or "in this newsgroup?" ;-)
It is a brave attempt. But you are
not quite escaping in spite of doing better.

Don't I know it!
[...stuff...]

The "s" in "italics" is essential to it. Without it, it would be
"italic".

I offer the foregoing to further our quibbling relationship. <g>


Thanks for your offer, but I seem to not be in the mood to accept.

Cheers.
 
J

Jonathan N. Little

dorayme said:
Jonathan N. Little said:
dorayme said:
Neredbojias wrote:
Well, as others have hinted, it's often better to put css in the head
section
or a seperate stylesheet, but here's some inline stuff:

<span style="font-style:italics;"

Minor correction: "italics" with an "s" is invalid; you'd want "italic".
Defined in <http://www.w3.org/TR/CSS21/fonts.html#font-styling>.
Major correction to a minor correction, there is no "italics" without an
"s" on or off the earth.
??

Italic (î-tàl´îk, ì-tàl´-) adjective
1.Of or relating to ancient Italy or its peoples or cultures.
2.Of or relating to Italic.
3. italic Abbr. ital. Of or being a style of printing type patterned on
a Renaissance script with the letters slanting to the right: This
sentence is printed in italic type.

noun
1.A branch of the Indo-European language family that includes Latin,
Faliscan, Oscan, Umbrian, and other languages or dialects.
2.Often italics Abbr. ital. Italic print or typeface.

[Latin Italicus, from Greek Italikos, from Italia, Italy, from Latin.]

Excerpted from The American Heritage® Dictionary of the English
Language, Third Edition © 1996 by Houghton Mifflin Company. Electronic
version licensed from INSO Corporation; further reproduction and
distribution in accordance with the Copyright Law of the United States.
All rights reserved.

Scholasticism gone mad in the 21st Century! <g>

Nowhere in this whole excerpt of yours does it show how "italics" has no
"s"

You can see the "s" right there before your eyes! Every single "italics"
that has ever existed or exists now or will exist, had, has, will have
"s". Even God cannot make this untrue, so your American Heritage
Dictionary certainly cannot.

Huh? You confuse and confound me. "italic" is a legitimate word in its
own right.
 
D

dorayme

"Jonathan N. Little said:
dorayme wrote:
Huh? You confuse and confound me. "italic" is a legitimate word in its
own right.

So? That does not make for the literal possibility that "italics" could
have no "s".

There are two aspects to this whole question. One is a logical aspect
and the other is well... 'of the earth' ... practical ... a matter of
real life...

I have tried to convey the logical one. Perhaps you will never get to
see it. You need a background to understand how everything is what it is
and not something else. Let us leave this aside for now with what i have
said already.

Let me talk here instead about the other aspect which I am sure you will
have no difficulty with. Let me give you some background about some of
my volunteering work.

I manage a refuge for wounded words. So I know a bit about the
'lettering' side of things, the pain and suffering and that sort of
thing.

Those that have lost their "s"s are some of the saddest of all, they are
no longer different to similar words. They weep and cry in remembrance
as they wander in to seek help. No one understands them on earth except
me.

My refuge is a sort of letter bank where I keep a lot of spares and the
troubled words, under some circumstances (mainly where therapy fails)
can get replacements for their losses. I employ, at a discount rate, a
retired English Lit. academic to do the surgery.

There are many pommy (that's oz for English, mate) words here that are
not at all happy *with* their "s"s and and want their "z"s back. They
are very sad sights and I feel ashamed of myself for laughing every time
one walks in for help. But at least, I get quite a few spare "s"s this
way.

Where do I get the "z"s from? Don't be alarmed, it is not via any
disturbing means like human trafficking in Europe or Falun Gong organs
in China.

There is a balance in these things, a sort of conservation of the total
number of letters. Without going into the details, I get by. (If you
really want to know more about the maths of all this - you call it math
- please send for my paper called "The History of the Distribution of
the Letters", enclose $US18.50 to cover my costs.
 
M

Mark A. Boyd

dorayme posted in alt.html:
I manage a refuge for wounded words. So I know a bit about the
'lettering' side of things, the pain and suffering and that sort of
thing.

Those that have lost their "s"s are some of the saddest of all, they are
no longer different to similar words. They weep and cry in remembrance
as they wander in to seek help. No one understands them on earth except
me.

Does it help them to know that some of them are donating their "s"s to words
that did not have them previously? For example, mouses?
 

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

No members online now.

Forum statistics

Threads
474,093
Messages
2,570,614
Members
47,230
Latest member
RenaldoDut

Latest Threads

Top