During website development, you often need to browse a large number of images on a certain page. If you consider traffic, you can display only one image on each page like pconline, each time you see an image, you need to download the entire page
The size of the CSS background image does not change with the browser scaling. the css background image
The size of the background image on the homepage of some websites does not change with the browser scaling. For example, the size of the
the order in which page responses are loaded:1, Domain name analysis, loading html-> loading js and css-> loading pictures and other informationThe DOM detailed steps are as follows:
Parses the HTML structure.
Load external scripts and
8.1 Image Label () and source attribute (SRC)In HTML, the image is defined by the tag. is an empty label, meaning that it contains only attributes and does not have a closed label.To display an image on a page, you need to use the source attribute
This article mainly introduces the basic usage of img image labels in HTMLXHTML, and lists some common attributes of img labels, for more information, see image labels.
HTML/XHTML image tagsIn XHTML, labels are used to define the display of an
the order in which page responses are loaded:1, Domain name analysis, loading html-> loading js and css-> loading pictures and other informationThe DOM detailed steps are as follows:
Parses the HTML structure.
Load external scripts and
By using HTML, you can display images in your document.Instance
Inserting images
This example shows how to display an image in a Web page.
Insert a picture from a different location
This example
Web site development often need to achieve a large number of images in a page to browse, if you consider the flow, can be like pconline each page shows only a picture, so that users each look at a picture will need to download the entire page.
[HTML element] embedded image, html embedded image
The img element allows us to embed images in HTML documents.
To embed an image, use the src and alt attributes. The Code is as follows:
Display Effect:
1. Embed images in hyperlinks
A common use
Image Label properties in HTML
The image can make the webpage more vivid and beautiful. The browser can display JPEG and GIF images, in which GIF images can only use 256 colors (that is, only 8-bit color can be saved)
color), and the JPEG format can
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.