Change Font Size: Previous / Next / Directory List
7.1. HTML img tags
Img tags - on behalf of HTML image
- Img there is a separate label,
<img /> - Attribute:
- Common - general attributes
-
Alt- Tips on behalf of text image -
Src- on behalf of a source image (image is the location) -
Height- on behalf of a high degree of image -
Width- on behalf of the width of an image
- Img, image (image) initials
- Trackback Address: http://www.nt22.com/xhtml-html/tag_img/
Grammar
<imgSrc="URI"alt="alttext"title="titletext"/>
Description:
-
Img- is the label image -
Src- attributes browser picture tells the specific location, like the same link href labels tell the browser to link to documents, can be used Absolute and relative paths path -
Alt- picture of the alternative text. Some here who do not want to see the picture (for example, because of slow network speed), some early browser does not support picture, there is a possible 'you the specific location of the picture wrong', the situation here is not the picture, then alt position in the picture displayed on a substitute text, it is very useful, we must remember that the -
Title- Photo tips text, picture when the mouse to stay on, will prompt the relevant text - In the example above does not specify the width of image
widthand height ofheight,in fact the browser will automatically identify the image height and width, we generally do not have to be appointed unless there are other purposes, such as potential increases or narrow picture
Example
<imgSrc="html_filex.png"alt="alttext"title="titletext"/>
Extended reading
- CSS background-image attribute definition of a background picture
