HTML TUTORIALS-
HTML Attribute Reference Learntosap -
Introduction-
HTML Attribute Reference Learntosap -
-What IS HTML Attribute Reference -Attributes provide extra information about HTML elements.They are always included in the opening tag and usually come in name="value" pairs...also Attributes provide additional details
about an element.They help define the behavior, appearance, or data of HTML elements...Example:-
<strong><a href="https://learntosap.com">Visit Learntosap</a></strong>
-)📌 Common HTML Attributes with Examples:- href
<a href="https://learntosap.com">Visit Learntosap</a>🔹-href is the attribute name.
🔹-"https://example.com" is the value.
🔹-Together, they tell the browser where the link should go.
-)🛠️ General Rules of Attributes-
🔹-Attributes are always added to the opening tag.
🔹-Most attributes have a name and a value, separated by an equals sign =.
🔹-The value is enclosed in quotes (single or double quotes are both are allowed).
🔹-Some attributes are boolean (e.g., disabled, checked, readonly) and don’t need a value.
-)📌 Common HTML Attributes with Examples:- title
<a title="https:// Welcome To learntosap.com">Visit Learntosap.com</a>-)🧩 Common HTML Attributes with Examples:- src
🔹- Used in elements like <img>, <video>, or <iframe>, src sets the source of the file (image, video, page, etc.).
<a src="img.jpg">Visit Learntosap.com</a>-)🧩 Common HTML Attributes with Examples:- target
🔹- Used in <a> tags, the target attribute defines where to open the linked document
<a href="page.html" target="_blank">Open in New Tab</a>-)🧩 Common HTML Attributes with Examples:- action
🔹- Used in <a> forms, it tells the browser where to send the form data..
<form action="submit.php" method="post">-)🧩 Common HTML Attributes with Examples:- style
🔹- Used in Inline styling with CSS is done using the style attribute. It allows you to change colors, size, spacing, etc., directly within the HTML tag..
<h2 style="color:blue; font-size:24px;">Styled Heading</h2>-)HTML Global Attributes Reference:-
| No | Attribute | Purpose |
|---|---|---|
| 1. | <id> | Unique identifier. |
| 2. | <class> | CSS/JavaScript targeting. |
| 3. | <style> | Inline styling. |
| 4. | <title> | Tooltip text. |
| 5. | <hidden> | Hides the element. |
| 6. | <accesskey> | Shortcut key. |
| 7. | <lang> | Defines the language. |
| 8. | <multiple> | select multiple files. |