The way you style your attribute names should be consistent with the one chosen for elements, so don’t mix and match like this:
<applicationUser first-name=”Joe” />, where you have camel-casing for the element names and hyphenated attributes.
A number of rules also govern attributes exist:
- Attributes consist of a name and a value separated by an equals sign. The name, for example,
myFirstAttribute, follows the same rules as element names.
- The attribute value must be in quotes. You can use either single or double quotes, the choice is entirely yours. You can use single on some attributes and double on others, but you can’t mix them in a single attribute.
- There must be a value part, even if it’s just empty quotes. You can’t have something like
<option selected>as you might in HTML.
My brain can't help but place the relative pronoun that between the two clauses: A number of rules that also govern attributes exist. Why is that? This type of grammar doesn't seem to be that common. And what would happen with the meaning if I changed the sentence slightly, like so: A number of rules governing attributes exist?