Image label attributes in HTML _css/html

Source: Internet
Author: User
Image Label properties in HTML
The image can make the webpage more vivid and beautiful. The browser can display JPEG and GIF images, in which GIF images can only use 256 colors (that is, only 8-bit color can be saved)
color), and the JPEG format can be saved to 24 bits, which has the best effect on the image with specific continuous tones. However, GIF images, although not as JPEG images in quality,
It takes up the storage space and downloads faster. Therefore, depending on the circumstances, the image of which format should be used should be determined.
Inserting images in an HTML document is achieved by tags. The label has a total of 9 properties. Except that attribute src is not a default, other properties are available
Selected.
 
One, src attribute. SRC is 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 the relative notation can be used to identify the image only if the image file and the HTML document are in the same directory
The position of the piece.
Second, align Properties. The parameter value of the Align property is top,middle,bottom. Indicates that the adjacent text of the image is located in the upper left of the image, in the middle, and the lower right
Party. For example:
<title> test Page </title>
<body>
<HR>
my icons look good?
<br>
<HR>
<P><BR>
What about this one more?
<br>
<p>
<HR>
</body>
You can change the image into your own. Note that the default directory for browsers is the Windows/temp temporary folder. You need to specify the directory where the image is located.
Four, alt attribute. When browsing the Web, users often choose not to download pictures for time or for other reasons, and adding Alt attributes 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 in the place where the image was originally displayed, generally
is the name and brief description of the image. For example.
<title> test Page </title>
<body>
<HR>

You can't see that, do you? Hey
<br>
<HR>
<P><BR>
<br><P>
</body>
Five, determines the image margin properties.
tags use the vspace and Hspace properties to determine the size of the white space between the image and its adjacent object. The Vspace property is used to specify the image and its vertical side
The distance between adjacent objects up. The hspave is used to specify the distance between the image and its horizontal direction adjacent to the object. The arguments for both properties are numbers, indicating that the null
The number of pixel points for the distance.
Six, border properties.
When the browser calls the image, it adds a different width to the image, depending on the browser window and the size of the original image. We can use the Border property to specify the diagram
Like the width of the border or remove the border <border=0>. The parameter value of the Border property is also a number that represents the pixel count of the border width. For example:
<title> test Page </title>
<body>
<HR>

Look at the effect on the line.
<br>
<HR>
<P><BR>
</body>
The larger the border parameter value, the larger the border.
Seven, Ismap property
This property is related to the hyperlink in the document and we'll explain it in detail later.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.