具有 URL 值的 HTML 标记属性的完整列表? [英] COMPLETE list of HTML tag attributes which have a URL value?
问题描述
除以下内容外,是否还有任何 HTML 标记属性将 URL 作为其值?
href
标签上的属性:、
,有一个类型";列,然后查找 URI 类型.
当然还有 该列表的 HTML 5 版本也很有用 (HTML 5.2 的更新链接 此处)
对于 HTML4,我们有:
HTML 5 添加了一些(HTML5 似乎也没有使用上面的一些):
<嵌入 src=url>
和
这些不一定是简单的网址:
或
或
SVG 还可以包含资源链接:
<svg><image href=url";/></svg>
此外,
style
属性可以包含带有一个或多个 url 的 css 声明.例如:Besides the following, are there any HTML tag attributes that have a URL as their value?
href
attribute on tags:<link>
,<a>
,<area>
src
attribute on tags:<img>
,<iframe>
,<frame>
,<embed>
,<script>
,<input>
action
attribute on tags:<form>
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.
解决方案Check out the W3C's list of HTML attributes, there's a "type" column in there and just look for URI types.
And of course the HTML 5 version of that list is useful too (edit: updated link for HTML 5.2 here)
So for HTML4 we've got:
<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):
<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:
<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>
In addition, the
style
attribute can contain css declarations with one or several urls. For example:<div style="background: url(image.png)">
这篇关于具有 URL 值的 HTML 标记属性的完整列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文