HTML language analysis 9: graphic Markup

Source: Internet
Author: User
Analysis of HTML language-9 ▲ Top

IX. Graphic Markup

■ :
graphic tags are mainly used to insert images into webpages. for other purposes, such as video files and Image maps (Image maps or multiple links) as mentioned in this section, see [image map] and [other tags ].

General parameter settings:

For example,

  • Src = "logo.gif"
    Image Source, In. gif,. jpg and. png formats. The first two have been in use for a long time, and the latter has been developed since 96 years and will replace the first two in the future. If the image file and the html file are in the same directory, write only the file case name. Otherwise, the correct path must be added, which is relatively and absolutely acceptable.
  • Width = 100 height = 100
    Sets the image size. The width and height are usually measured in pixels. It is usually set to the actual size of the image to avoid distortion. To change the image size, it is best to use the image editing tool in advance.
  • Hspace = 5 vspace = 5
    Set the image edge to blank to avoid text or other images being too close. The relationship between the left and right sides of the image is set, and the relationship between the vspace and the upper and lower spaces of the image is set. The unit of height is pixels.
  • Border = 2
    Border thickness.
  • Align = "top"
    Adjust the text position next to an image. You can control the text displayed on the top, middle, bottom, left, and right of the image. Optional values: top, middle, bottom, left, right, botom. Netscape also supports texttop, baseline, absmiddle, absbottom,
    Texttop indicates that the image and text are based on the top line,
    Baseline indicates the bottom line value of the image to the current text line,
    Absmiddle indicates that the image is absolutely central to the current text line,
    Absbottom indicates the absolute bottom of an image to the current text line (the absolute bottom refers to the bottom edge of y, g, q, and other words ).
  • Alt = "Logo of PenPal Garden"
    This is the text used to describe the image. If you use a text browser, because images are not supported, these words will be displayed instead of images. If the browser supports image display, the text will be displayed when you move the cursor over the image.
  • Lowsrc = "pre_logo.gif"
    Set to display a low-resolution image first. If a large image is added and the image is downloaded for a long time, the image will be displayed first to avoid browsing loss and interest, it can be used as the gray-scale version of the original image.

Example 1:

Original code normal insertion
Display result Normal insert

Example 2:

Original code set the upper left and lower left spaces
Display result Set the upper, lower, and left blank positions

Example 3:

Original code set the upper left and lower left spaces
Display result Set the middle Of the calligraphy and painting, and the Border thickness is 4.

Example 4:

Original code set the image to the right.
Display result Set the image to the right.

Example 5:

Original code enlarged image
Display result Enlarged image

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.