HTML5 对各个标签的定义与规定:link
- 所有全局属性
href
rel
media
hreflang
type
sizes
title(title属性对于link标签有特殊的含义)
- alternate:设置替换文档
archives:历史归档
author:文档作者
first:与当前文档同系列的第一个文档。
help:帮助文档
icon:文档图标
index:当前文档的内容表格或链接清单。
last:与当前文档同系列的最后一个文档。
license:当前文档的版权license
next:与当前文档同系列的下一个文档。
pingback:显示pingback当前文档的,pingback服务器地址。
prefetch:预加载资源
prev:与当前文档同系列的上一个文档。
search:相关的搜索页面
stylesheet:外部css样式文档
sidebar:侧边栏设置
tag:标签
up:当前文档的上下文文档
属于meta信息。
放在head中,或者head的子元素noscript中。
为空元素。
拥有属性
DOM 接口:
- 代码: 全选 运行
-
interface HTMLLinkElement : HTMLElement {<br> attribute boolean disabled;<br> attribute DOMString href;<br> attribute DOMString rel;<br> readonly attribute DOMTokenList relList;<br> attribute DOMString media;<br> attribute DOMString hreflang;<br> attribute DOMString type;<br> [PutForwards=value] readonly attribute DOMSettableTokenList sizes;<br> };<br> HTMLLinkElement implements LinkStyle;
link标签用途是设置文档的外部资源。
rel和href属性必须设置,其中href属性必须是一个有效的URL。
其中rel可设置成以下值:
link标签可以建立两种形式的链接,一种是外部资源,另一种是超级连接,例如rel设置成stylesheet是载入外部css样式文档,而设置成first就是意味着告诉浏览器该文档所处系列的第一个文档的超级链接。
一个link标签可以同时设置多个链接(甚至可以包含一些外部资源形式的和一些超级链接形式的),可设置的链接数量取决于link标签的rel属性的设置。
link标签执行过程:
1、如果href值为空,则停止解析此标签。
2、如果资源的URL属性是相对的,则根据相对此文件计算绝对URL值。
3、如果失败,停止解析。
4、根据绝对URL载入资源。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











H5referstoHTML5,apivotaltechnologyinwebdevelopment.1)HTML5introducesnewelementsandAPIsforrich,dynamicwebapplications.2)Itsupportsmultimediawithoutplugins,enhancinguserexperienceacrossdevices.3)SemanticelementsimprovecontentstructureandSEO.4)H5'srespo

Web standards and technologies have evolved from HTML4, CSS2 and simple JavaScript to date and have undergone significant developments. 1) HTML5 introduces APIs such as Canvas and WebStorage, which enhances the complexity and interactivity of web applications. 2) CSS3 adds animation and transition functions to make the page more effective. 3) JavaScript improves development efficiency and code readability through modern syntax of Node.js and ES6, such as arrow functions and classes. These changes have promoted the development of performance optimization and best practices of web applications.

Best practices for H5 code include: 1. Use correct DOCTYPE declarations and character encoding; 2. Use semantic tags; 3. Reduce HTTP requests; 4. Use asynchronous loading; 5. Optimize images. These practices can improve the efficiency, maintainability and user experience of web pages.

H5 is not just the abbreviation of HTML5, it represents a wider modern web development technology ecosystem: 1. H5 includes HTML5, CSS3, JavaScript and related APIs and technologies; 2. It provides a richer, interactive and smooth user experience, and can run seamlessly on multiple devices; 3. Using the H5 technology stack, you can create responsive web pages and complex interactive functions.

H5 and HTML5 refer to the same thing, namely HTML5. HTML5 is the fifth version of HTML, bringing new features such as semantic tags, multimedia support, canvas and graphics, offline storage and local storage, improving the expressiveness and interactivity of web pages.

HTML5 is a key technology for building modern web pages, providing many new elements and features. 1. HTML5 introduces semantic elements such as, , etc., which enhances web page structure and SEO. 2. Support multimedia elements and embed media without plug-ins. 3. Forms enhance new input types and verification properties, simplifying the verification process. 4. Offer offline and local storage functions to improve web page performance and user experience.

HTML5 code consists of tags, elements and attributes: 1. The tag defines the content type and is surrounded by angle brackets, such as. 2. Elements are composed of start tags, contents and end tags, such as contents. 3. Attributes define key-value pairs in the start tag, enhance functions, such as. These are the basic units for building web structure.

H5 improves web user experience with multimedia support, offline storage and performance optimization. 1) Multimedia support: H5 and elements simplify development and improve user experience. 2) Offline storage: WebStorage and IndexedDB allow offline use to improve the experience. 3) Performance optimization: WebWorkers and elements optimize performance to reduce bandwidth consumption.
