Image Label properties in HTML
Images can make Web pages more vivid and beautiful. The browser can display JPEG and GIF images, where GIF images can be used up to 256 colors (that is, only 8-bit
color), and the JPEG format can be saved as a 24-bit, with the best effect on the image of a specific continuous tone. However, GIF images are less than JPEG images in image quality, but
It takes up the storage space and downloads fast. It is therefore appropriate to decide which format to use for the image in different situations.
Inserting an image in an HTML document is done by means of a label. The label has a total of 9 properties. Except that the attribute SRC is not default, other properties are available
Selected.
One, src attribute. SRC is the source, which indicates where the referenced image file is located. For example:
Absolute path notation:
Relative path notation:
The attribute parameter value of src is the URL of the image file. Note that relative notation can be used to identify images only when the image file and HTML document are in the same directory
The location of the pieces.
Two, the Align property. The Align property has a parameter value of Top,middle,bottom. respectively, the text adjacent to the image is located in the upper left of the image, the center of the right, and the bottom
Party. For example:
<title>Test page</title>
Does my icon look good?
How about a look at this?
You can change the image to your own. Note that the default directory for the browser is the Windows/temp Temp folder. You need to specify the directory where the image is located.
Four, alt attribute. Users in the Web browsing, often in order to save time or other reasons to choose not to download pictures, add alt attribute can be displayed in the original image
The location shows some information about the image. The parameter value of the ALT attribute is the text message that the page editor wants to appear where the image was originally displayed, generally
is the name of the image and a brief description. For example.
Test page
You can't see that, do you? Hey
Five. Determine the properties of the image margin.
The label uses the Vspace and Hspace properties to determine the size of the white space between the image and its neighbor objects. The Vspace property is used to specify the image and its perpendicular side
The distance between the upward adjacent objects. The hspave is used to specify the distance between the image and its horizontal orientation of adjacent objects. The arguments for both properties are numbers, which means that the empty
The pixel count of the distance.
Six, border property.
When the browser calls the image, it adds a different width to the image depending on the browser window and the original image size. We can use the Border property to specify the graph
Like the width of the border or the border . The parameter value of the Border property is also a number that represents the pixel count of the border width. For example:
Test page
Just look at the effect.
The larger the value of the border, the larger the bounding rectangle.
Seven, Ismap property
This property is related to the hyperlink in the document, and we'll explain it in detail later.