Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > body text= tags do not work

Reply
Thread Tools

body text= tags do not work

 
 
Rob
Guest
Posts: n/a
 
      08-02-2008
Hi,

When trying to change the text color of a paragraph I saw that the tag
<body text="#FFFF00"> has no effect at all.
The text which should be yellow, remails white (on a black
background).

My page is structured in a very simple way, like this:

<html>
<body>

blablabla
blablabla
blablabla


</body>
</html>


What I tried was:

<html>
<body>

blablabla
blablabla
</body>
<body text="#FFFF00">
blablabla
</body>
blablabla
</body>
</html>

The result was: no change at all in the color of the text (all of the
text was visible).
This happened both in MSIE and in Mozilla Filrefox.

What did I do wrong and how can I get my colors?

Thanks for your reply,

Rob.

 
Reply With Quote
 
 
 
 
J.O. Aho
Guest
Posts: n/a
 
      08-02-2008
Rob wrote:
> Hi,
>
> When trying to change the text color of a paragraph I saw that the tag
> <body text="#FFFF00"> has no effect at all.
> The text which should be yellow, remails white (on a black
> background).


You are allowed to have one body in the page, all extra ones are ignored.

You can use css to get the color of your taste.

a simple example would be

<div style="color: yellow;">your yellow text here</div>


--

//Aho
 
Reply With Quote
 
 
 
 
Rob
Guest
Posts: n/a
 
      08-02-2008
Op Sat, 02 Aug 2008 13:21:44 +0200, "J.O. Aho" <(E-Mail Removed)>
schreef:

>Rob wrote:
>You are allowed to have one body in the page, all extra ones are ignored.
>
>You can use css to get the color of your taste.
>
>a simple example would be
>
><div style="color: yellow;">your yellow text here</div>
>

Perfect, thanks!!!

Rob.


>
>--
>
> //Aho


 
Reply With Quote
 
Harlan Messinger
Guest
Posts: n/a
 
      08-03-2008
Rob wrote:
> Hi,
>
> When trying to change the text color of a paragraph I saw that the tag
> <body text="#FFFF00"> has no effect at all.


Why on earth would you think that it would?
 
Reply With Quote
 
Andy Dingley
Guest
Posts: n/a
 
      08-04-2008
On 2 Aug, 12:10, (E-Mail Removed) (Rob) wrote:

> What did I do wrong and how can I get my colors?


Colors: //Aho has given you an answwer already.

What did you do wrong? Something that's not uncommon, but doesn't
work any better no matter how many people try it. HTML has a defined
structure to it. You can't mess with this, you can't invent new ways
of doing things, just because you think, "that's how it ought to
work". Maybe it is - maybe your great new idea would indeed be better:
except that it isn't how the browsers are coded to work, so it isn't
how they're going to render your page when they receive it. You have
to play by HTML's rules, or else it doesn't work.

Of course you don't _have_to_ follow HTML's rules. No one dies. But if
you don't, it doesn't work.

It's sometimes said that you _shouldn't_ follow HTML's rules. If you
use tricksy little gimmicks, then you can make things work "better"
than by following the rules. You'll be a rad design-d00d and your
pages will r4wk. Rubbish. If you can get something to work by doing it
wrong, you can get it to work equally well by doing it right. It's
also easier that way.

Why is it easier? Obviously learning to get HTML right is at least
_some_ extra work over doing it any old how. So "correct" must be
harder? Actually it's not. This is because there's only one "correct",
and it's written down in the HTML spec. "Wrong" HTML, or "HTML that
works kind of OK on one browser" comes in any number of different
flavours and they're not clearly documented. So although it's not
trivial to learn the right way, at least you only have to do it once,
from one source, and then it's right on every browser. That's a _lot_
easier than finding a "wrong but workable" way that's consistent
between browsers.

How to learn it? This is tricky - most of the refs out there are
badly done and frequently themselves wrong. IMHO there's barely one
book worth reading as a primer (Head First HTML with CSS & XHTML) and
possibly one website (http://htmldog.net) and even that's not perfect.
Once you've gone through a basic tutorial, start trying to read the
official W3C HTML specs (and not W3CSchools, who are just a bunch of
fakers passing themselves off as the W3C!). Keep reading this
newsgroup and c.i.w.a.h too.
 
Reply With Quote
 
Ari Heino
Guest
Posts: n/a
 
      08-04-2008
> IMHO there's barely one
> book worth reading as a primer (Head First HTML with CSS & XHTML) and
> possibly one website (http://htmldog.net) and even that's not perfect.


I guess you meant http://htmldog.com/

--
Ari
 
Reply With Quote
 
Andy Dingley
Guest
Posts: n/a
 
      08-04-2008
On 4 Aug, 10:32, Ari Heino <(E-Mail Removed)> wrote:
> > IMHO there's barely one
> > book worth reading as a primer (Head First HTML with CSS & XHTML) and
> > possibly one website (http://htmldog.net) and even that's not perfect.

>
> I guess you meanthttp://htmldog.com/


That's the one, thanks.
 
Reply With Quote
 
Rob
Guest
Posts: n/a
 
      08-04-2008
What did I do wrong?
Well, I took a HTML tutorial book, looked up 'color' in the index and
followed the instructions on the page mentioned in the aforesaid
index.
There was no warning on the page about not using the tag <body> more
than once.
BTW, 'body' or 'tag body' is NOT in the index.
I looked for a mention that the tag 'body' can be used only once, but
I did not see it.

Very useful book!

Kind regards,

Rob.




Op Mon, 4 Aug 2008 02:46:05 -0700 (PDT), Andy Dingley
<(E-Mail Removed)> schreef:

>On 4 Aug, 10:32, Ari Heino <(E-Mail Removed)> wrote:
>> > IMHO there's barely one
>> > book worth reading as a primer (Head First HTML with CSS & XHTML) and
>> > possibly one website (http://htmldog.net) and even that's not perfect.

>>
>> I guess you meanthttp://htmldog.com/

>
>That's the one, thanks.


 
Reply With Quote
 
Rob
Guest
Posts: n/a
 
      08-05-2008

Never mind, it's not in English anyhow.

It dates from a few years ago, but already has HLML version4.

Kind regards,

Rob.



Op Tue, 05 Aug 2008 01:09:31 +0100, Andy Dingley
<(E-Mail Removed)> schreef:

>On Mon, 04 Aug 2008 19:51:21 GMT, http://www.velocityreviews.com/forums/(E-Mail Removed) (Rob) wrote:
>
>>Well, I took a HTML tutorial book, looked up 'color' in the index and
>>followed the instructions on the page

>
>Which book was it?
>
>How old was it?
>
>Note the part where I stated that nearly all HTML tutorials are
>frequently wrong.
>


 
Reply With Quote
 
Harlan Messinger
Guest
Posts: n/a
 
      08-09-2008
jACK wrote:
>
> Some of you people here are getting to be a shame to the group.
>
> Perfect example here. 44 lines of lecture, and not a one to help the
> poor guy. You could have gone a long way to help him with the problem
> in the same 44 lines.
>
> No, you have to show your smarts with your lecture.


People tend not to want to do other people's homework for them, whether
literally or figuratively. If a person is just making up even the most
fundamental aspects of creating a web page and expecting it to work
(honestly, no tutorial or reference work taught him that the body tag
has a text attribute), something to the effect of "You need to read
about how this works for real if you expect to accomplish anything" is a
legitimate response. And in case you didn't notice, the final paragraph
of Andy's reply was full of helpful advice on how to learn how HTML works.
 
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
all the text (including tags) between <body> .. </body> tarakparekh@yahoo.com Perl Misc 5 09-07-2005 11:40 PM
how to write jsp custom tag that can have all kind of jsp elements(not only other tags but also srciplets) in his body Lukasz Indyk Java 1 09-22-2004 12:43 PM
Re: Those cute little "WORK-SAFE" / "NOT WORK-SAFE" tags that people put in the Subject headers of their posts... Soapy Digital Photography 1 08-16-2004 12:07 PM
Re: Those cute little "WORK-SAFE" / "NOT WORK-SAFE" tags that people put in the Subject headers of their posts... Soapy Digital Photography 1 08-16-2004 06:24 AM
Not detecting body.scrollTop and body.scrollLeft in IE6 London Boy Javascript 2 01-12-2004 08:44 AM



Advertisments