跳到主要内容

💥 link

链接元数据

场景用例

<!-- HTML 代码 -->

属性

属性(Attribute)说明(Description)值(Value)
hrefAddress of the hyperlinkValid non-empty URL potentially surrounded by spaces
crossoriginHow the element handles crossorigin requests"anonymous"; "use-credentials"
relRelationship between the document containing the hyperlink and the destination resourceUnordered set of unique space-separated tokens*
asPotential destination for a preload request (for rel="preload" and rel="modulepreload")Potential destination, for rel="preload"; script-like destination, for rel="modulepreload"
mediaApplicable mediaValid media query list
hreflangLanguage of the linked resourceValid BCP 47 language tag
typeHint for the type of the referenced resourceValid MIME type string
sizesSizes of the icons (for rel="icon")Unordered set of unique space-separated tokens, ASCII case-insensitive, consisting of sizes*
imagesrcsetImages to use in different situations, e.g., high-resolution displays, small monitors, etc. (for rel="preload")Comma-separated list of image candidate strings
imagesizesImage sizes for different page layouts (for rel="preload")Valid source size list
referrerpolicyReferrer policy for fetches initiated by the elementReferrer policy
integrityIntegrity metadata used in Subresource Integrity checks [SRI]Text
blockingWhether the element is potentially render-blockingUnordered set of unique space-separated tokens*
colorColor to use when customizing a site's icon (for rel="mask-icon")CSS <color>
disabledWhether the link is disabledBoolean attribute
fetchprioritySets the priority for fetches initiated by the element"auto"; "high"; "low"

事件

事件(Event)说明(Description)值(Value)接口(Interface)
----

参考