Posts

Showing posts with the label Alt

Understanding HTML Attributes

Image
HTML attributes are special words used within the opening tag to control the element's behavior. These are always specified in the start tag and usually come in name/value pairs like name="value". Example <img src="myimage.jpg" alt="A picture of me"> In this example, <code>src</code> and <code>alt</code> are both HTML attributes of the <img> element. The <code>src</code> attribute specifies the source file for the image, and the <code>alt</code> attribute provides a text description of the image. Common HTML Attributes 1. Class and ID <div id="header">...</div> <p class="highlight">...</p> In the above example, <code>id</code> attribute is assigned a unique value of "header" for the <div> tag, while the <code>class...