The code for displaying images in html is "". The HTML img tag defines an image in an HTML page, and the src attribute of the tag specifies the URL where the image is displayed.
The operating environment of this tutorial: Windows 7 system, HTML5 version, Dell G3 computer.
In HTML, you can display images by adding the img tag; the img tag defines the image in the HTML page.
Syntax:
<img src="图片文件地址" alt="图像的替代文本" width="图像宽度值" height="图像高度值">
src: Specifies the URL to display the image.
#alt: Specifies the alternative text for the image.
width: Specifies the width of the image.
#height: Specifies the height of the image.
Example:
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> </head> <body> <img src="/i/eg_tulip.jpg" alt="上海鲜花港 - 郁金香" /> </body> </html>
Related recommendations: "html video tutorial"
The above is the detailed content of What is the code to display images in html. For more information, please follow other related articles on the PHP Chinese website!