]. 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  >  Article  >  Web Front-end  >  How to embed pictures in html

How to embed pictures in html

王林
王林Original
2021-02-24 11:26:4411641browse

How to embed pictures in html: You can insert pictures by using the img tag, such as [How to embed pictures in html]. The img tag only contains attributes and no closing tag. src is its attribute, used to indicate the path source of the image.

How to embed pictures in html

The operating environment of this article: windows10 system, html 5, thinkpad t480 computer.

In HTML, the How to embed pictures in html tag is usually used to insert an image. The syntax format is as follows:

<img  src="url" / alt="How to embed pictures in html" >

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%">

How to embed pictures in html

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:What is div in htmlNext article:What is div in html