This article mainly introduces the relevant information of HTML image img tag. Friends who need it can refer to it
Abstract
##project instruction
Form
##
Support
H2 / e2 / N2 / Fx1 / Op6 / Ch1 / Sa1
#Tag omitted
Start tag: required, end tag: none
Description
img is the abbreviation of Image. The src attribute is used to specify the path to the image.
In HTML4.01, in order to cooperate with various browsers that cannot display images and audio reading browsers, the alt attribute in the tag must be set. HTML5 becomes optional.
Although the height attribute and width attribute are not necessary, if these two attributes are set, the image can be opened faster, and certain display bugs can be avoided when displaying the image.
Attributes
[Important attributes]
Attribute
Meaning
src=url
H2 /e2 /N2. The path to the image. Required attribute.
##alt=alt
H2 /e2 /N2 . Description of the picture. When some browsers cannot display the image, you can see the description of the image on the web page. It is a required attribute in HTML4.01.
##height=n
H3 /e2 /N2 . Set the image height.
##width=n
H3 /e2 /N2 . Set the image width.
【Features】
Attributes
Meaning
##align=align
H2-H4T/e2 /N2 . Specify the display position of the image. Set align="right" and align="left" to display text on the left or right side of the image. To cancel this effect, use .
##border=n
H3-H4T/e2 /N2. Specifies the thickness of the border line around the image. When an image is included in a ~ tag, a border line will be automatically generated. If you want to cancel, set border=0.
##galleryimg
=bool
e6 . When the mouse is placed on an image larger than 200×200, the toolbar is not displayed. It can also be specified globally in
.
##hspace=n
H3-H4T/e2 /N2. Sets the horizontal margin around the image.
##longdesc=url
H4. Use this attribute to point to the URL of the document containing the image description when the image description is too long for the title attribute to be displayed in full.
##lowsrc
=url
e4 /N2. If an image is large, it may take some time to display in the browser. While the image is still being transmitted over the network, you can use the lowsrc attribute to specify a thumbnail so that it is displayed on the browser first, and the thumbnail will be automatically replaced after the original image is transmitted.
##suppress
=suppress
N4. suppress means to suppress. The default value is false. If set to true, the image During transmission, the small icon that should be displayed at the image location will be replaced by a ToolTip (prompt box).
vspace=n
H3-H4T/e2 /N2. Sets the vertical space around the image.
name=name
H4/e4 /N3. Specify name.
【Clickable field related attributes】
Attributes
Meaning
##ismap
H2 /e2 /N2 . Specifies the image as a server-side image map.
##usemap=usemap
H3 /e2 /N2 . Specifies the image as a client image map. Please refer to
【Video related attributes】
Attributes
Meaning
##controls
e2-e3. Displays playback controls below the video. Deprecated in IE4.0.
##dynsrc=url
e2. Specify video file (*.avi). Because there are already
and tags, this attribute is basically useless.
loop=n
e2. Set play times. loop=
infinite will play in an infinite loop.
start=start
e2. When set to fileopen, the web page will be played as soon as it is opened. When set to mouseover, the video will start playing when the mouse is placed on it.
[Data binding related properties]
Attribute
Meaning
datafld=datafld
e4. Specify the column name of the data source for data binding.
##datasrc=datasrc
e4. Specifies the ID of the data source when binding data.
【General attributes】
Attributes
means
##class=class
H4 /e3 /N4 . Specify the class.
id=id
H4 /e3 /N4 . Specify ID.
style=style
H4 /e3 /N4 . Specify the style.
title=title
H4 /e4 /N6. Specify a title.
##dir=dir
H4 /e5 /N6 . Specifies the direction in which text is displayed.
lang=lang
H4 /e4 /N6 . Specify the language type.
accesskey=key
H5. Assign shortcut keys.
##tabindex=n
H5. Specify the order in which the TAB keys move in the control.
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn