What is the
img tag? [Recommended tutorial: HTML video tutorial]
The img tag defines images in HTML pages. There are two tags There are three required attributes: src and alt. The image will not be inserted into the HTML page, but will be linked to the HTML page.
Function: Embed an image into a web page.
Note: The tag does not insert an image into the web page, but links the image from the web page. The tag creates a placeholder for the referenced image. The tag has two required attributes: the src attribute and the alt attribute.
Note: In HTML, the tag has no closing tag.
html img tag example, and you can control the size of the image
<html> <body> <img src="https://img.php.cn/upload/article/000/000/003/5a9675cba0704196.jpg" width="400" alt="php中文网" /> <p>在img标签中可以控制图片的大小</p> </body> </html>
The above is the detailed content of What is the img tag?. For more information, please follow other related articles on the PHP Chinese website!