Skip to content

Invalid default color in main example #40662

@bobbykjack

Description

@bobbykjack

MDN URL

https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input/color

What specific section or headline is this issue about?

"JavaScript" (#javascript)

What information was incorrect, unhelpful, or incomplete?

The line:

const defaultColor = "blue";

looks wrong. Earlier in the page, there is a specific note:

Setting the value to anything that isn't a valid, fully-opaque, RGB color in hexadecimal notation will result in the value being set to #000000. In particular, you can't use CSS's standardized color names

And the line above should have no effect. For the intended effect, it should probably be:

const defaultColor = "#00f";

What did you expect to see?

const defaultColor = "#00f";

Do you have any supporting links, references, or citations?

No response

Do you have anything more you want to share?

No response

MDN metadata

Page report details

Metadata

Metadata

Assignees

No one assigned

    Labels

    Content:HTMLHypertext Markup Language docs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions