Enter HTML5 entry to proficient:<img> label

Source: Internet
Author: User
Keywords tags HTML5 Getting started to master

"Reprint please retain the integrity of the content of the Wind network article, if you do not comply with this principle, we will retain the right to pursue legal responsibility"

<img> Label

Definitions and usage

<img> label defines the image.

Differences between HTML 4.01 and HTML 5

In HTML 4.01, the image "align", "border", "hspace" and "vspace" are not in favor of use. These properties are no longer supported in HTML 5.

Example

<img src= "smile.gif" alt= "Smile"/>

Property

The

Property Value Description 4 5 alt text defines a short description of the graph. 4 5 src URL to display the URL of the image. 4 5 Align Top NRC middle left right stipulates how the image is aligned based on the surrounding text. Not supported. Please use CSS instead. 4 &amp;http://www.aliyun.com/zixun/aggregation/37954.html "&gt;nbsp; Border pixels defines the border around the image. Not supported. Please use CSS instead. 4 height pixels% defines the height of the image. 4 5 hspace pixels defines the left and right whitespace of the image. Not supported. Please use CSS instead. The 4 ismap URL defines the image as a server-side image map. 4 5 longdesc URL a URL that points to the document that describes the image. Not supported. 4 Usemap URL defines an image as a client-side image map. See the &lt;map&gt; and &lt;area&gt; tabs for how they work. 4 5 vspace pixels defines the white space at the top and bottom of the image. Not supported. Please use CSS instead. 4 5 width pixels% Sets the width of the image. 4 5

Standard properties

Class, Contenteditable, ContextMenu, dir, draggable, id, irrelevant, lang, ref, Registrationmark, TabIndex, template, For a complete description of the title, visit the standard properties in HTML 5.

Event Properties

Onabort, onbeforeunload, onblur, onchange, onclick, OnContextMenu, ondblclick, Ondrag, Ondragend, OnDragEnter, OnDragLeave, OnDragOver, ondragstart, OnDrop, OnError, onfocus, onkeydown, onkeypress, onkeyup, onload, OnMessage, OnMouseDown, OnMouseMove, onmouseover, onmouseout, onmouseup, OnMouseWheel, OnResize, Onscroll, Onselect, onsubmit, OnUnload for a complete description, visit the event properties in HTML 5.

Tiy instance

Inserts an image, this example shows how to display an image in a Web page. Slightly)

Insert a picture from a different location (abbreviated)

This example shows how to display a picture of another folder or server to a Web page.

Floating image, this example shows how to float a picture to the left or right of a paragraph.

<html>
<body>
<p>
<img src = "/i/eg_cute.gif" align = "left" >
A paragraph with an image. The Align property of the image is set to left. The image will float to the left of the text.
</p>
<p>
<img src = "/i/eg_cute.gif" align = "right" >
A paragraph with an image. The Align property of the image is set to right. The image floats to the right of the text.
</p>
</body>
</html>

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.