Create an Image Label

Create an Image Label

We can Create an Image Labelthat appears whenever the user positions the mouse pointer over a particular image on a web page. We can use labels to offer detailed information about the image.

Labels work differently from alternative text. Alternative text appears on the page itself when images are turned off. A label appears in a pop-up box when the user positions the mouse over the image. We add a label by including a title attribute in the <img> tag.

Create an Image Label

Step 1: Within the <img> tag, type title=”?”, replacing? with the image label, you want to appear.

Note: Label text can also help search engines determine the type of image content on your page. We can combine title information with alt information in the same image. See ” Add Alternative text” for more details

Result Output

<!DOCTYPE html>
        <Title>Coding thai</Title>
                text-align: center;
                text-transform: uppercase;
            span.highlight{background-color: #ffcc99;}
                background-color: #ffffcc;
                list-style-type: none;
                padding: 0;
            ul.horiz li{
                float: left;
                padding: 10px;

        <h1>Types of Web Developer</h1> 
        <ul class="horiz">
            <li><a href="index.html">Home</a></li>
            <li><a href="index.html">About Us</a></li>
            <li><a href="index.html">Contact Us</a></li>
            <li><a href="index.html">Service</a></li>
        <br style="clear:both">
            <li>Frontend Developer</li>
            <li>Back-end Developer</li>
        <Section class="First">
            <p> <span class="highlight">A front end developer</span> has one general responsibility: 
              to ensure that website visitors can easily interact with the page.
                and Back-end developers are the experts who build and maintain the mechanisms that 
              process data and perform actions on websites.</p>
        <img src="" height="250" width="50%" title="How to compile your scss to CSS">
       <small> &copy;Copyright 2022 Codingthai</small>

Follow us on Social Media For More


Leave a Comment