Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HTML Fun 1

Status
Not open for further replies.

dwarfthrower

Programmer
Apr 22, 2003
1,625
AU
Using IE

Specify the colour of "crap" for a font tag and have a look at the result:

[tt]<font color=&quot;crap&quot;>Crappy Text</font>[/tt]

Probably been posted before, but simple things amuse me.

Never be afraid to share your dreams with the world.
There's nothing the world loves more than the taste of really sweet dreams.
 
lmao

Tracey
Remember... True happiness is not getting what you want...

Its wanting what you have got!
 
Bored today are we?

FYI it also works in mozila
now get back to work [cheers]

Tracey
Remember... True happiness is not getting what you want...

Its wanting what you have got!
 
Why would the developers create such a named color? and why also would the standards at W3C accept such a name? brick I can understand, but crap that is just too sad.

so that is what you get when you crap a brick #-)

Einstein47
(&quot;There are no atheists when restoring from backup.&quot;)
 
>> Why would the developers create such a named color?

I know, who would have thought that computer programmers would have childish, immature senses of humour. ;-)

Never be afraid to share your dreams with the world.
There's nothing the world loves more than the taste of really sweet dreams.
 
well in case you all were thinking of tyring, diarrhea doesnt work much like i might have thought

[flush]

<signature>
sometime you just gotta say &quot;WHAT THE @#*% !!&quot;
</signature>
 
Maybe not, but when I get a few spare hours I'll be trying to find a few others...

I'm sure TGML just passes the color attribute to HTML. Who says it's W3C approved? Has anyone tried it on Opera yet? Maybe someone who works on IE or Mozilla put it in and e-mailed someone they know at the other one get them in on the joke...


Jeff
If your mind is too open your brains will fall out...
 
Sorry to shatter your illusions, but the browser tries to render colours if it doesn't understand them.

The following will show the same:

cram
crab

[wink]

Hope this helps



Wullie


The pessimist complains about the wind. The optimist expects it to change.
The leader adjusts the sails. - John Maxwell
 
maybe thats how you say crap in

Vietnamese
&
Atlantean

<signature>
sometime you just gotta say &quot;WHAT THE @#*% !!&quot;
</signature>
 
Yeah sure, take all the magic out of it. ;-)

A person can still throw a few 'presents' into their source code for the next person.


Jeff
If your mind is too open your brains will fall out...
 
shall i put you out of your misery?

the reason they render like that is because the browser tries to interpret them in the same way it does a hexcode, except invalid characters are treated as 0.

therefore...

crap becomes c0a000

and...

brick becomes b00c00

ss...
 
I've been playing with this (yeah, I know - get a life...) and it goes deeper. If it were a simple letter by letter parse, you would expect it to stop at 6 letters. However, &quot;aabbcc&quot; and &quot;aabbccdd&quot; turn out to be two different colors (in IE at least). &quot;aabbccxx&quot; is yet another color. I wasn't able to find an explanation of this on
Here's my test page, if someone else wants to waste time:

Code:
<!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;>
<html>
  <head>
    <meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=US-ASCII&quot; >
    <title>Color Test and Translation</title>
  </head>
<!-- *************** BODY *************** -->
  <body style=&quot;font-family: sans-serif; font-size: 10pt;&quot;>
    Another Fine Herkemeier Subsquatch Product... 
    <br>
    <h3>Color Tester And Translator</h3>
    
    <form action=&quot;post&quot;>
      Enter Color: <input type=&quot;text&quot;  name=&quot;txtIn&quot; /><br>
      Translation: <input type=&quot;text&quot;  name=&quot;txtDisp&quot; /><br><br>
      <button type=&quot;button&quot; name=&quot;btnSet&quot; onclick=&quot;document.bgColor=txtIn.value;txtDisp.value=document.bgColor;&quot;>Set Color</button>
    </form>
  </body>
</html>


Jeff
If your mind is too open your brains will fall out...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top