Detailed answer
Attributes add settings or information in an opening tag.
Some accept strings, some accept defined keywords, and boolean attributes are true when present. Quote values consistently. A global attribute such as id works on many elements, but an attribute like href has an element-specific purpose.
Example
<a id="guide" href="/html/" title="Read the guide">HTML guide</a>
Understanding the behavior
An attribute modifies the element on which it appears. Quote values containing spaces, and choose attributes supported by that element. A class identifies styling or scripting hooks; it does not automatically create a visual style.
Practical implementation notes
Change one attribute at a time and inspect the resulting DOM property. For URL attributes, also check the resolved destination, because the browser can resolve a relative value against the document URL.
How to check it
Inspect the opening anchor tag and follow its href; use the id only for identification.
Expected result
The link navigates to /html/ and the id does not determine its destination.
Watch out: Check that an attribute is supported by the element using it.
Read the reference ↗