0% found this document useful (0 votes)
4 views

HTML+Attributes+for+Various+HTML+Elements 1

The document lists commonly used HTML attributes for various elements, including 'id', 'class', 'style', 'src', and 'href'. It explains the purpose of each attribute, such as specifying unique identifiers, styling, and functionality for elements like images, links, and input fields. Additionally, it notes that there are many more attributes available, depending on the element's intended use.

Uploaded by

dilann869
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

HTML+Attributes+for+Various+HTML+Elements 1

The document lists commonly used HTML attributes for various elements, including 'id', 'class', 'style', 'src', and 'href'. It explains the purpose of each attribute, such as specifying unique identifiers, styling, and functionality for elements like images, links, and input fields. Additionally, it notes that there are many more attributes available, depending on the element's intended use.

Uploaded by

dilann869
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Certainly!

Here are some commonly used HTML attributes for various HTML elements:

1. id: Specifies a unique identifier for an element.

2. class: Specifies one or more class names for an element (used for styling with CSS).

3. style: Specifies inline CSS styles for an element.

4. src: Specifies the source URL for an external resource, such as an image or script.

5. href: Specifies the destination URL for a hyperlink.

6. alt: Specifies alternative text for an image, displayed when the image cannot be loaded.

7. width and height: Specifies the width and height of an element, such as an image or table
cell.

8. disabled: Specifies that an element should be disabled (e.g., a disabled button or input field).

9. placeholder: Specifies placeholder text for an input field.

10. required: Specifies that an input field must be filled out before submitting a form.

11. checked: Specifies that a checkbox or radio button should be pre-selected.

12. readonly: Specifies that an input field is read-only and cannot be edited.

13. value: Specifies the initial value for an input field.

14. colspan and rowspan: Specifies the number of columns or rows a table cell should span.

15. title: Specifies additional information about an element (often displayed as a tooltip).

16. target: Specifies where to open a linked document (e.g., in a new window or tab).

These are just a few examples, and there are many more attributes available for different HTML
elements. The specific attributes you use will depend on the element and its intended purpose.

You might also like