HTML and CSS Reference
Q: Can I just make up new attributes for an HTML
A: Web browsers only know about a predefined set of
attributes for each element. If you just made up attributes,
then browsers wouldn't know what to do with them, and as
you'll see later in the topic, doing this will very likely get you
into trouble. When a browser recognizes an element or an
attribute, we like to say that it “supports” that element or
attribute. You should only use attributes that you know are
That said, for programming web applications (the subject
of Head First HTML5 Programming ), HTML5 now supports
custom data attributes that allow you to make up custom
names for new attributes.
Q: Who decides what is “supported”?
A: There are standards committees that worry about the
elements and attributes of HTML. These committees are made
up of people with nothing better to do who generously give
their time and energy to make sure there's a common HTML
roadmap that all organizations can use to implement their
Q: How do I know what attributes and elements
are supported? Or can all attributes be applied to any
A: Only certain attributes can be used with a given
element. Think about it this way: you wouldn't use an attribute
“convertible” with the element <toaster>, would you? So, you
only want to use attributes that make sense and are supported
by the element.
The “href” attribute is
pronounced “h - ref”…
You're going to be learning which attributes are supported by
which elements as you make your way through the topic. After
you've finished the topic, there are lots of great references
you can use to refresh your memory, such as HTML & XHTML:
The Definitive Guide (O'Reilly).