HTML Beginner Tutorial-Images

Source: Internet
Author: User
Tags add format relative
Beginners | tutorials

Site original content, reproduced please indicate the source Web page teaching network .

It's also OK if the page is in this format, but it makes you feel boring, the Web page is not all text, it is multimedia, and the most common form of media is the image.

The IMG tag is used to put an image into an HTML file, as follows:

The SRC attribute tells the browser where to look for images. Like a label, you can use an absolute path and a relative path, as in the example above, which is the absolute path used. You can use relative paths, if there is a ' http://www.webjx.com/htmldata/2005-02-27/webjxcom.jpg ' picture file in a directory, then our code can be changed to , when we make our own website to facilitate the management of the site, we can create a directory dedicated to storing pictures, For example, to create a images directory where there is a http://www.webjx.com/htmldata/2005-02-27/webjxcom.jpg then our code can be changed to:

The width and Height properties of the picture are required, and if they are omitted, the browser will compute its own size, thus increasing the load time of the page, meaning that the speed of opening your Web page will be reduced. So I suggest that you add the height and width of the image to the IMG tag.

The ALT attribute is another possible description. A hint that can appear when the mouse points to a picture. Note Now that the Web standard build station is promoted then we add the IMG tag at the end of the IMG tag.

Description

Although the production of the image is another aspect of Web page content, but also more critical. It affects the overall effect of your Web page, so this site added a graphic image Zone to introduce this technology, I hope you to see.

Usually the pictures we use on the Web page have two formats: JPG and GIF.

Images in GIF format can only reach 256 colors, but they maintain the original image color. Reduce the number of colors you have in the image and reduce the size of the file.

JPG format pictures using the mathematical algorithm compression image, will increase the size of the picture file, but will be more clearly displayed image content, and more colorful.

The design of the image is also an important operation of the Web designer. A picture that is too big may make your Web page download very slowly, and a small image may not be able to express your intentions. In the production of their own in practice to experience it! I don't have to say much here.



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.