]. The img tag only contains attributes and no closing tag. src is its attribute, used to indicate the path source of the image."/> ]. The img tag only contains attributes and no closing tag. src is its attribute, used to indicate the path source of the image.">
Home >Web Front-end >HTML Tutorial >How to embed pictures in html
How to embed pictures in html: You can insert pictures by using the img tag, such as []. The img tag only contains attributes and no closing tag. src is its attribute, used to indicate the path source of the image.
The operating environment of this article: windows10 system, html 5, thinkpad t480 computer.
In HTML, the tag is usually used to insert an image. The syntax format is as follows:
<img src="url" / alt="How to embed pictures in html" >
is the abbreviation of image. It only contains attributes and is not closed. Label. src is its required attribute, used to indicate the path source of the image.
src is the abbreviation of source, which is used to declare the source of the image file, that is, to define the reference address of the image. Pictures can be in various formats such as .jpg, .png, .gif, etc., and the reference address can be a relative URL or an absolute URL.
Example:
<img src="smiley-2.gif" alt="Smiley face" width="42" style="max-width:90%">
Recommended learning: html tutorial
The above is the detailed content of How to embed pictures in html. For more information, please follow other related articles on the PHP Chinese website!