Attributes may refer to any of the following:
With computer systems, attributes are the characteristics of a file in the context of a file system. For example, if the file had a read-only attribute, the file cannot have any changes (write protection), and can only be read. See our file attributes definition for further information about this type of an attribute.
Attrib is a command that lets you adjust the attributes of a file in MS-DOS and Windows. See our attrib command page for further information on this command.
Within an HTML tag, an attribute dictates certain aspects of an element. Attributes are made up of a name and value pair. In the ‘a’ tag example below, “href” is an attribute name with the value “hope.html.”
Do I need quotes around attribute values?
Yes. Although today’s browsers can usually read attribute values with missing quotes around them, it is best practice to always have double quotes to prevent errors.
- Do I need quotes around attribute values?
- How many attributes can a tag have?
- How to add multiple attribute values.
- Is the order of attribute values important?
- Related information.
How many attributes can a tag have?
A tag could have as many valid attributes as needed as long as they’re separated by a space and not duplicated. For example, in the following tag, the a tag has three different attribute names.
In the above example, the link points to the hope.html file, uses the big class defined in a CSS file, and is stylized as red text.
How to add multiple attribute values
Multiple attribute values can be added by separating them with a space. For example, in the following example, we moved the font color into a CSS file and called it “red.”
Is the order of attribute values important?
No. As long as the attribute values are contained in the tag they can be in any order.
- When referring to an attribute in a word processor, it is a characteristic of a character, word, or line. For example, an underlined word has an underline attribute.
Related information
- See our HTML and web design help for a full listing of HTML tags and attributes.
- In database management systems, an attribute is sometimes used as a synonym for a field.
Archive attribute, Database terms, Display attribute, Flag, Operating system terms, Parameter, Permissions, Read-only, Read/Write, Software terms, Word processor terms, Write