Besides the following, are there any HTML tag attributes that have a URL as their value?
除了以下内容,是否有任何HTML标记属性具有URL作为其值?
-
href
attribute on tags:<link>
,<a>
,<area>
- 标签上的href属性: ,,
-
src
attribute on tags:<img>
,<iframe>
,<frame>
,<embed>
,<script>
,<input>
- 标签上的src属性:,
-
action
attribute on tags:<form>
- 标签上的action属性:
-
data
attribute on tags:<object>
- 标签上的数据属性:
Looking for tags in wide usage, including non-standard tags and old browsers as well as HTML 4.01, HTML 5, and XHTML.
寻找广泛使用的标签,包括非标准标签和旧浏览器以及HTML 4.01,HTML 5和XHTML。
2 个解决方案
#1
77
Check out the W3C's list of HTML attributes, there's a "type" column in there and just look for URI types.
查看W3C的HTML属性列表,其中有一个“类型”列,只查找URI类型。
And of course the HTML 5 version of that list is useful too (edit: updated link for HTML 5.2 here)
当然,该列表的HTML 5版本也很有用(编辑:HTML 5.2的更新链接)
So for HTML4 we've got:
所以对于HTML4我们有:
<a href=url>
<applet codebase=url>
<area href=url>
<base href=url>
-
<blockquote cite=url>
<body background=url>
<del cite=url>
-
<form action=url>
-
<frame longdesc=url>
and<frame src=url>
- 和
<head profile=url>
-
<iframe longdesc=url>
and<iframe src=url>
-
<img longdesc=url>
and<img src=url>
and<img usemap=url>
- 和和
-
<input src=url>
and<input usemap=url>
- 和
<ins cite=url>
<link href=url>
-
<object classid=url>
and<object codebase=url>
and<object data=url>
and<object usemap=url>
<q cite=url>
<script src=url>
HTML 5 adds a few (and HTML5 seems to not use some of the ones above as well):
HTML 5添加了一些(HTML5似乎也没有使用上面的一些):
<audio src=url>
<button formaction=url>
<command icon=url>
-
<embed src=url>
<html manifest=url>
<input formaction=url>
<source src=url>
<track src=url>
-
<video poster=url>
and<video src=url>
These aren't necessarily simple URLs:
这些不一定是简单的URL:
<img srcset="url1 resolution1 url2 resolution2">
<source srcset="url1 resolution1 url2 resolution2">
-
<object archive=url>
or<object archive="url1 url2 url3">
-
或 -
<applet archive=url>
or<applet archive=url1,url2,url3>
<meta http-equiv="refresh" content="seconds; url">
SVGs can also contain links to resources: <svg><image href="url" /></svg>
SVG还可以包含资源链接:
In addition, the style
attribute can contain css declarations with one or several urls. For example: <div style="background: url(image.png)">
此外,style属性可以包含带有一个或多个url的css声明。例如:
#2
2
So you can include:
所以你可以包括:
<style>
#domID {
background:url()
}
</style>
#1
77
Check out the W3C's list of HTML attributes, there's a "type" column in there and just look for URI types.
查看W3C的HTML属性列表,其中有一个“类型”列,只查找URI类型。
And of course the HTML 5 version of that list is useful too (edit: updated link for HTML 5.2 here)
当然,该列表的HTML 5版本也很有用(编辑:HTML 5.2的更新链接)
So for HTML4 we've got:
所以对于HTML4我们有:
<a href=url>
<applet codebase=url>
-
<area href=url>
<base href=url>
-
<blockquote cite=url>
<body background=url>
<del cite=url>
-
<form action=url>
-
<frame longdesc=url>
and<frame src=url>
- 和
<head profile=url>
-
<iframe longdesc=url>
and<iframe src=url>
-
<img longdesc=url>
and<img src=url>
and<img usemap=url>
- 和和
-
<input src=url>
and<input usemap=url>
- 和
<ins cite=url>
<link href=url>
-
<object classid=url>
and<object codebase=url>
and<object data=url>
and<object usemap=url>
-
和 和 和 <q cite=url>
<script src=url>
HTML 5 adds a few (and HTML5 seems to not use some of the ones above as well):
HTML 5添加了一些(HTML5似乎也没有使用上面的一些):
<audio src=url>
<button formaction=url>
<command icon=url>
-
<embed src=url>
<html manifest=url>
<input formaction=url>
<source src=url>
<track src=url>
-
<video poster=url>
and<video src=url>
-
和
These aren't necessarily simple URLs:
这些不一定是简单的URL:
<img srcset="url1 resolution1 url2 resolution2">
<source srcset="url1 resolution1 url2 resolution2">
-
<object archive=url>
or<object archive="url1 url2 url3">
-
或 -
<applet archive=url>
or<applet archive=url1,url2,url3>
-
或 <meta http-equiv="refresh" content="seconds; url">
SVGs can also contain links to resources: <svg><image href="url" /></svg>
SVG还可以包含资源链接:
In addition, the style
attribute can contain css declarations with one or several urls. For example: <div style="background: url(image.png)">
此外,style属性可以包含带有一个或多个url的css声明。例如:
#2
2
So you can include:
所以你可以包括:
<style>
#domID {
background:url()
}
</style>