HTML picture (Images)
By <img> The HTML Tag can be inserted inside picture. The most basic syntax is as follows:
<img Src="url" />
Url picture that the path and file name. For example images/logo/nt22_logo01.gif url can be, it can also be a relatively path ".. / images/logo/nt22_logo01.gif."
Photo alt attribute
<img> In an alt attribute, English called alternate text. Examples are as follows:
<img Src = "../images/html_tutorials/smile.jpg" alt="smile face" />
If the browser did not contain a picture of the function of the browser will be displayed instead Alt attribute values.
In fact, most browsers now support picture printed in. Alt attribute on this, because it is another important function. At present search engine crawler does not recognize text contained in the image, so used to write on ALT attributes of the picture, ease of search engines crawl the content of your website.
Photo align attribute
Align with attributes can be changed picture of the vertical (UN-Habitat, the center, under the UN-Habitat) and the level of the Alignment Alignment (Habitat left, center, right of abode).
The size of picture
In the default situation, the picture shows that the size of the original. You can change the height and width attributes picture size. But if the size was changed, the corresponding image will be enlarged or reduced, the result may show that it would be very difficult to see.
Proposal
Picture relative words, more of the number of bytes, such as a full-screen picture, even after compression, but also account for approximately 50 k bytes, which is equivalent to 25,000 characters of text. Therefore browser load images relatively time-consuming, proposed an HTML document will not contain too many of the pictures, otherwise they will affect your page is speed.
More examples
This example will demonstrate how a picture as the background picture HTML pages.
Will be a picture as a hyperlink
This example demonstrates how a picture as a hyperlink, click on a picture that can be connected to other documents.
