1. id:
Specifies a unique identifier for an HTML element.
Example: <div id="my-element">...</div>
2. class:
Specifies one or more class names for an HTML element.
Example: <p class="highlight">...</p>
3. style:
Specifies inline CSS styles for an HTML element.
Example: <h1 style="color: red;">...</h1>
4. src:
Specifies the source URL of an external resource, such as an image or a script.
Example: <img src="image.jpg" alt="Image">
5. href:
Specifies the destination URL of a hyperlink.
Example: <a href="https://www.example.com">Link</a>
6. alt:
Specifies alternative text for an image, to be displayed if the image cannot be loaded.
Example: <img src="image.jpg" alt="Description of the image">
7. width and height:
Specifies the width and height of an element, such as an image or a table.
Example: <img src="image.jpg" width="200" height="150" alt="Image">
8. disabled:
Specifies that an input element should be disabled.
Example: <input type="text" disabled>
9. placeholder:
Specifies a short hint that describes the expected value of an input element.
Example: <input type="text" placeholder="Enter your name">
10. required:
Specifies that an input element must be filled out before submitting a form.
Example: <input type="text" required>
11. target:
Specifies where to open a linked document or resource.
Example: <a href="https://www.example.com" target="_blank">Link</a>
12. rel:
Specifies the relationship between the current document and the linked document.
Example: <link rel="stylesheet" href="styles.css">
13. title:
Specifies extra information about an element, displayed as a tooltip.
Example: <img src="image.jpg" alt="Image" title="Click to enlarge">
14. name:
Specifies the name of an element, typically used in form submission.
Example: <input type="text" name="username">
15. value:
Specifies the initial value of an input element.
Example: <input type="text" value="Default value">
16. maxlength:
Specifies the maximum number of characters allowed in an input element.
Example: <input type="text" maxlength="50">
17. readonly:
Specifies that an input element is read-only and cannot be edited.
Example: <input type="text" value="Read-only value" readonly>
18. disabled:
Specifies that an element is disabled and cannot be interacted with.
Example: <button disabled>Click me</button>
19. rows and cols:
Specifies the number of rows and columns in a textarea element.
Example: <textarea rows="4" cols="30"></textarea>
20. required:
Specifies that an input element must be filled out before submitting a form.
Example: <input type="text" required>
21. data-*:
Allows you to store custom data attributes within an element for scripting or styling purposes.
Example: <div data-id="12345">Custom Data</div>
22. srcset:
Specifies multiple image sources for responsive images, allowing the browser to choose the appropriate one.
Example: <img src="image.jpg" srcset="image.jpg 1x, image@2x.jpg 2x" alt="Responsive Image">
23. autoplay:
Specifies that an audio or video element should start playing automatically.
Example: <video src="video.mp4" autoplay controls>
24. loop:
Specifies that an audio or video element should start playing again from the beginning when it reaches the end.
Example: <video src="video.mp4" loop controls>
25. checked:
Specifies that a checkbox or radio button should be pre-selected when the page loads.
Example: <input type="checkbox" checked>
26. selected:
Specifies that an option in a select element should be pre-selected when the page loads.
Example: <select> <option value="option1">Option 1</option> <option value="option2" selected>Option 2</option> </select>
27. min and max:
Specifies the minimum and maximum values for an input element with a numeric or date type.
Example: <input type="number" min="1" max="100">
28. step:
Specifies the increment or decrement step for an input element with a numeric type.
Example: <input type="number" step="0.5">
29. download:
Specifies that a link should be downloaded instead of opening in the browser when clicked.
Example: <a href="document.pdf" download>Download PDF</a>
30. form:
Specifies the form to which an input element belongs.
Example: <input type="text" name="username" form="myForm">
31. autocomplete:
Specifies whether an input field should have autocomplete enabled or disabled.
Example: <input type="text" autocomplete="off">
32. multiple:
Specifies that multiple options can be selected in a select element or multiple files can be selected in an input element with type "file".
Example: <select multiple> <option value="option1">Option 1</option> <option value="option2">Option 2</option> </select>
33. colspan and rowspan:
Specifies the number of columns or rows a table cell should span.
Example: <td colspan="2">Spanning two columns</td>
34. readonly:
Specifies that an input element is read-only and cannot be edited, but still allows for user selection.
Example: <input type="text" value="Read-only value" readonly>
35. target:
Specifies where to open a linked document or resource.
Example: <a href="https://www.example.com" target="_blank">Link</a>
36. contenteditable:
Specifies whether the content of an element is editable by the user.
Example: <div contenteditable="true">Editable content</div>
37. formaction:
Specifies the URL to which the form should be submitted when using an input element with type "submit" or "image".
Example: <input type="submit" value="Submit" formaction="submit.php">
38. formmethod:
Specifies the HTTP method to be used when submitting the form.
Example: <form method="post">...</form>
39. formenctype:
Specifies how the form data should be encoded before submitting it to the server.
Example: <form enctype="multipart/form-data">...</form>
40. datetime:
Specifies a date and time value for an element, often used with the <time> element.
Example: <time datetime="2023-06-14T09:30:00">June 14, 2023, 9:30 AM</time>
41. tabindex:
Specifies the tabbing order of elements when navigating through them using the keyboard.
Example: <input type="text" tabindex="1">
42. target:
Specifies the browsing context (such as a frame or a window) where the linked document should open.
Example: <a href="https://www.example.com" target="_blank">Link</a>
43. aria-*:
Defines accessible properties and states for elements, used to improve accessibility for users with disabilities.
Example: <div role="button" aria-label="Click me">Button</div>
44. spellcheck:
Specifies whether the browser should check the spelling of the content within an editable element.
Example: <textarea spellcheck="false"></textarea>
45. autoplay:
Specifies that an audio or video element should start playing automatically.
Example: <video src="video.mp4" autoplay controls>
46. controls:
Specifies that audio or video controls should be displayed for an audio or video element.
Example: <video src="video.mp4" controls>
47. defer:
Specifies that a script should be executed after the document has been parsed.
Example: <script src="script.js" defer></script>
48. async:
Specifies that a script should be executed asynchronously, without blocking the rendering of the page.
Example: <script src="script.js" async></script>
49. wrap:
Specifies how the text in a textarea should be wrapped when it exceeds the specified width.
Example: <textarea wrap="hard"></textarea>
50. hidden:
Specifies that an element should be hidden from view.
Example: <div hidden>Hidden content</div>
0 Comments