HTML Basics Review (ii) images

Source: Internet
Author: User

In HTML, the image is defined by the tag and is an empty element

1. SRC attribute

The Source property, which is the URL address.

2. alt attribute

Replace the Text property, and when the picture fails to load, the browser displays the alternate text instead of the image.

3. Height/width Properties

Height/width of image, default unit is pixel

4. Border Border Property

5. CSS "Float" property

<p>

6. Define HYPERLINK Images

<a href= "http://www.runoob.com/html/html-tutorial.html" ></a>

7. Define map image (client image map)----have clickable area image

(1) property "Usemap": can refer to the Id/name in <map>

(2) Label <map>: Add attribute Id/name

(3) Label <area>: Always nested inside the map element

8. Note:

In HTML5, if the id attribute is specified in the <map> tag, you must also specify the Name property.

In XHTML, the Name property is deprecated and replaced with the id attribute.

9. Srcset Properties:

Sizes Properties: (plus the sizes attribute, it will be found that the image retains its initial size as the width of the browser becomes larger)

10. Common Image Format----GIF (Image Interchange Format)

Suffix: GIF image files are used with. gif (or. GIF) as a filename suffix, there are actually two GIF versions: the original GIF87 and gif89a, which support many new features, including transparent backgrounds, cross-storage and animations

Features: Strong portability, lossless compression, easy to implement animations

GIF images have three special tricks: interlaced scanning (interlacing), transparency (transparency), and animation (animation).

11. Common Image Format----JPEG

Suffix: usually by a. jpg (or. JPG) file name to end

Study materials: "http://www.w3school.com.cn/media/media_gif.asp";

"Http://www.runoob.com/html/html-images.html"

HTML Basics Review (ii) images

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.