Lesson 3: HTML Attributes
Working with HTML Attributes
Attributes provide additional information about HTML elements. They are always specified in the opening tag and usually come in name/value pairs like name=”value”.
<a href="https://example.com">Visit Example</a>
Why & How to Use:
Attributes configure element behavior, such as providing hyperlink destinations, defining image source paths, or setting input constraints.
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>HTML Attributes</title></head><body> <h1>Attribute Example</h1> <a href="https://example.com" target="_blank">Click here to open link in a new tab</a></body></html>