Date: January 20, 2015 Author: sun Adding appropriate pictures to the web page can enrich the web page,Website DesignIt is more attractive.So, how to insert images into web pages?You can use the<img>tag to insert pictures into HTML files<The common attributes of img>tags are as follows: (1) Scr attribute: set the relative or absolute path of the picture. (2) Alt attribute: set the simple text description of the image. (3) Align attribute: sets the image alignment. The values are left, right, top, middle, and bottom. (4) Border attribute: set the thickness of the picture border. (5) Height property: set the height of the picture. (6) Width property: set the width of the picture. (7) Hspace attribute: set the horizontal spacing of the picture. (8) Vspace attribute: set the vertical spacing of the picture. (9) Name attribute: set the name of the picture. (10) Usemap attribute: set the location and name of the hotspot link. (11) Longdesc attribute: set the caption of the picture. (12) Lowsrc attribute: set the relative or absolute position of the low resolution image.Among the above attributes, two are most commonly used: src and alt. The src attribute must contain an absolute path or a relative path.Pictures can be GIF files, JPEG files, or PNG files. When browsing Web pages, it is often found that in some cases, such as due to browser reasons or network problems, pictures may not be displayed.If it is a decorative picture, it does not have much impact. If it is closely related to the content, it will affect the effect. Therefore, even if it cannot be displayed, at least tell the viewer what the picture is about.This can be done by using the alt attribute. The width attribute and height attribute are used to specify the size of the image displayed on the page.Generally speaking, if not specified, it will be displayed in the original size.You can specify an absolute size or a relative size. The absolute size is in pixels and the relative size is in percentage. If only one of the width attribute and height attribute is set, the browser will automatically adjust the other attribute according to the width height ratio of the image to ensure that the image is not deformed.However, if both are set, the image may be distorted.