html image : Lesson6 HTML for beginners

HTML image

It is the image that is included in the HTML page, which is inside the <img> tag. In all cases, the images give an aesthetic to our page on the web, as including them inside the page leads to more user interaction.

 

1. Definition

<img src = "url" alt="alternative text">

Where the tag contains an <img> followed by the word src, which contains the link to our image, and the word alt, which contains the alt text of the image.

 

2. Uses

Images are one of the most popular tags on websites, and they are displayed in their actual size on the pages and are very important to attract new visitors, such as:

  • Use them as thumbnails in Thumbnails web pages.
  • Use it at the beginning of the page and display it in full size.
  • Show more than one image on the same page depending on the nature of the article.

 

3. Example

Please, to understand the html image well, copy the following codes into the text file and do not forget to change its extension to .html and then run it in your browser.

<html>
    <head><title>How to coordinate images</title></head>
    
    <body>
        <img src = "https://tajersys.com/wp-content/uploads/2021/08/%D9%85%D8%B5%D8%A7%D9%86%D8%B9-%D8%A7%D9%84%D8%B3%D9%8A%D8%A7%D8%B1%D8%A7%D8%AA-13-5.png" alt="image">
    </body>
    
</html>

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *