1. Picture Label
Property:
SRC: Refers to the path where the picture is displayed (location)
Absolute path: D:\Pictures\Saved Pictures
Relative path:
① Same level: Write file name directly or./File name
② upper level:.. /File name
③ Next Level: Write the directory name/file name
Width: Specifies how wide the picture is, whether the value can be a pixel value, or it can be a percentage
Height: Specifies the height of the image, which can be either a pixel value or a percentage
ALT: A hint when the picture is not displayed correctly (the property is displayed in relation to the browser and browser version)
2, first prepare two pictures placed in the IMG folder,
The code is as follows:
1 <!DOCTYPE HTML>2 <HTML>3 <Head>4 <MetaCharSet= "UTF-8">5 <title>Page Image Display page</title>6 </Head>7 <Body>8 <imgsrc=".. /img/logo2.png "width= "260px"Height= "45px"alt= "logo image"/>9 <imgsrc=".. /img/header.png "width= "300px"Height= "45px"alt= "header Picture"/>Ten </Body> One </HTML>
The results are as follows:
3, if the picture is placed in the case two: the Website picture information folder, relative path directly write path name, src= "Logo2"
If the picture location and path are inconsistent, the picture does not display properly, and the contents of Alt are displayed as follows:
HTML Basics--Site Image display page