Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > How To? : Display text with highlighted background

Reply
Thread Tools

How To? : Display text with highlighted background

 
 
dorayme
Guest
Posts: n/a
 
      08-28-2008
In article <B3Ftk.57453$(E-Mail Removed)> ,
"Jukka K. Korpela" <(E-Mail Removed)> wrote:

> http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
>
> > Also... many thanks to Nico for this one:
> > http://www.w3schools.com/css/css_examples.asp

>
> 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.

--------------
* I am right now perfecting some specially designed torture equipment to
use when I hunt down and capture it."

--
dorayme
 
Reply With Quote
 
 
 
 
Phonedude
Guest
Posts: n/a
 
      08-29-2008

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
On Aug 28, 2:29 pm, "nice.guy.nige" <(E-Mail Removed)> wrote:
> <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/


 
Reply With Quote
 
 
 
 
dorayme
Guest
Posts: n/a
 
      08-29-2008
In article <(E-Mail Removed)>,
Ed Mullen <(E-Mail Removed)> wrote:

> dorayme wrote:
> > In article <B3Ftk.57453$(E-Mail Removed)> ,
> > "Jukka K. Korpela" <(E-Mail Removed)> wrote:
> >
> >> (E-Mail Removed) wrote:
> >>
> >>> Also... many thanks to Nico for this one:
> >>> http://www.w3schools.com/css/css_examples.asp
> >> 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.
> >
> > --------------
> > * I am right now perfecting some specially designed torture equipment to
> > use when I hunt down and capture it."
> >

>
> 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.

--
dorayme
 
Reply With Quote
 
dorayme
Guest
Posts: n/a
 
      08-29-2008
In article <(E-Mail Removed)>,
Ed Mullen <(E-Mail Removed)> wrote:

> 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

--
dorayme
 
Reply With Quote
 
Neredbojias
Guest
Posts: n/a
 
      08-29-2008
On 28 Aug 2008, (E-Mail Removed) wrote:

> On Aug 28, 1:45*pm, Neredbojias <(E-Mail Removed)> 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>

--
Neredbojias
http://www.neredbojias.net/
Great Sights and Sounds
http://adult.neredbojias.net/ (adult)
 
Reply With Quote
 
John Hosking
Guest
Posts: n/a
 
      08-29-2008
Neredbojias wrote:
> On 28 Aug 2008, (E-Mail Removed) wrote:
>
>> 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/>.

--
John
Possessive "its" has no apostrophe. Even on the Internet.
 
Reply With Quote
 
dorayme
Guest
Posts: n/a
 
      08-29-2008
In article <48b7a4a5$(E-Mail Removed)>,
John Hosking <(E-Mail Removed)> wrote:

> 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.

--
dorayme
 
Reply With Quote
 
Neredbojias
Guest
Posts: n/a
 
      08-29-2008
On 29 Aug 2008, John Hosking <(E-Mail Removed)> wrote:

> Neredbojias wrote:
>> <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>.


Yep. Less'n 2 weeks ago I made a mental note to myself to remember the right
one. _That_ worked real well...

--
Neredbojias
http://www.neredbojias.net/
Great Sights and Sounds
http://adult.neredbojias.net/ (adult)
 
Reply With Quote
 
John Hosking
Guest
Posts: n/a
 
      08-30-2008
dorayme wrote:
> In article <48b7a4a5$(E-Mail Removed)>, John Hosking wrote:
>
>> 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.


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?

--
John
The possessive pronoun, "its", has no apostrophe. Even on the Internet.
 
Reply With Quote
 
Jonathan N. Little
Guest
Posts: n/a
 
      08-30-2008
dorayme wrote:
> In article <48b7a4a5$(E-Mail Removed)>,
> John Hosking <(E-Mail Removed)> wrote:
>
>> 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 (-tlk, -tl-) 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.


--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
can't see highlighted text pythonwin msngirgi Python 1 08-10-2009 01:19 PM
how to retrive highlighted text in a browser? wcc Python 3 07-04-2005 07:34 AM
Googlebar: can't read white text that's highlighted? GroupFug Firefox 4 03-28-2005 05:32 AM
Text editor with keywords highlighted MARTIN Herve \(EXT\) Java 2 11-03-2003 04:52 PM



Advertisments