1.3.2 HTML basic tag-Image Tag

Source: Internet
Author: User

Insert images into the webpage and play video files on the webpage.

Common attributes include:
Src = URL of the image file
Images can be JPEG, GIF, or PNG files.
Alt = simple text description of the image
The image cannot be displayed in the browser or the text cannot be displayed when the image loading time is too long.
Height = displays the Height pixel or percentage of the image)
Width = display the image Width in pixels or percentage)
If the height or width is given, the image is scaled proportionally.
HSpace = the interval pixel between the left and right adjacent objects)
VSpace = the interval pixel between the upper and lower adjacent objects)
Align = alignment when the image is not displayed in the displayed area for hours
You can use the Align attribute to set the vertical Align of the image and text when you perform text-and-image mixing on the page. The values of the Align attribute are as follows:
Top: Align the image with the top of the text.
Middle: The image is aligned to the center of the text.
Bottom: The image is aligned with the bottom of the text.
You can also wrap the text around the left and right of the image. The value of the Align attribute is as follows:
Left: The image uses the left text to the right.
Right: The image is left in the right text.
If the inserted image occupies a single row on the page, you can place the Img Tag between the <P> and </P> tags, the Align attribute marked by P is used to set the Align of the image on the page. Use the Clear attribute of the line feed mark </Br> to move the text after the line break to the image.
Border = number of image borders.
Controls: specifies this option. If a multimedia file exists, a set of video Controls are displayed.
DynSrc = specifies the URL of the multimedia file to be played.
In the Img tag, the DynSrc attribute takes precedence over the Src attribute. If the computer has a multimedia function and the specified multimedia file exists, the multimedia file is played. If the computer does not have the multimedia function, or the specified multimedia file does not exist, the image file specified by the Src attribute is displayed.
Start = when to Start playing multimedia files
The value can be fileopen or mouseover.
Loop = integer number of playback times of multimedia files)
If you do not limit the number of playbacks, set this attribute to the keyword infinite.
LoopDelay = the delay between two playback operations is measured in milliseconds)

Example 1.3: multimedia on the webpage.
Source code, for example, ex1-3.htm ):

<Html> <Head> <Title> multimedia on the webpage </Title> </Head>
<Body> <P Align = "center">
</P>


</Body> </Html>

BibliographyPrevious sectionNext section

Related Article

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.