2

The bgcolor tag takes different words and changes the color.

What actually happens? Does it take the ASCII values?

<html>
    <head>
        <title> Background Color </title>
    </head>

    <body bgcolor="Daniel">
    </body>
</html>

When I assign random words to the bgcolor tag, it applies some kinda color. How does it work?

Daniel_V
  • 174
  • 1
  • 2
  • 16
  • 3
    Insist upon using CSS. Don't use such HTML attributes. – Lion May 19 '13 at 15:24
  • 1
    @Daniel_V : Many of such HTML attributes are deprecated (or at least about to be deprecated), their usage is highly discouraged and they're liable to be removed in the future. – Lion May 19 '13 at 15:34

1 Answers1

3

By taking a screenshot of the page rendered by your code, and selecting the rendered pink-ish color in Photoshop, you can see that it's #da00e0.

DAniEl, only A-F and 0-9 are kept, and the others are zeroed.

I'm pretty sure if you use bgcolor="Cyrille" you'll have plain red (#C00000).

(Edit: actually, Cyrille gives #c000e0)

By the way, you shouldn't even be using this bgColor attribute. CSS is here for one reason!

Cyrille
  • 25,014
  • 12
  • 67
  • 90