" method."> How to set pictures in html-HTML Tutorial-php.cn

How to set pictures in html

藏色散人
Release: 2023-01-04 09:33:42
Original
10819 people have browsed it

htmlHow to set the image: First create an HTML sample file; then insert an image into the html page through the "" method Just a picture.

How to set pictures in html

The operating environment of this article: Windows7 system, HTML5&&CSS3 version, DELL G3 computer

html setting image example

In the following example, we insert into the page a photo of tulips taken by W3School engineers at Shanghai Flower Port:

上海鲜花港 - 郁金香
Copy after login

The effect of the above code:

How to set pictures in html

iHTMLHow to set pictures in htmltag introduction

The img element embeds an image into a web page.

Please note that technically theHow to set pictures in htmltag does not insert an image into the web page, but rather links the image from the web page. TheHow to set pictures in htmltag creates a placeholder for the referenced image.

How to set pictures in htmltag has two required attributes: src attribute and alt attribute.

Differences between HTML and XHTML

In HTML, theHow to set pictures in htmltag does not have a closing tag.

In XHTML, theHow to set pictures in htmltag must be closed properly.

In HTML 4.01, the use of the "align", "border", "hspace" and "vspace" attributes of the image element is deprecated.

In XHTML 1.0 Strict DTD, the "align", "border", "hspace" and "vspace" attributes of the image element are not supported.

How to set pictures in html

Recommended learning: "HTML video tutorial" "css video tutorial"

The above is the detailed content of How to set pictures in html. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!