"."/> ".">
Home > Article > Web Front-end > What do link and rel mean when introducing CSS styles?
Introduce link and rel in CSS style: 1. Link is a tag in HTML used to define the relationship between a document and external resources. The most common use is to connect a CSS style sheet; 2. rel is a tag that stipulates the relationship between the current document and external resources. For the attributes of the relationship between linked documents or resources, the style syntax to introduce is "".
The operating environment of this tutorial: Windows 10 system, CSS3&&HTML5 version, Dell G3 computer.
link
## tag defines the relationship between the document and external resources. The most common use of the tag is to link style sheets. Note: The link element is an empty element, it only contains attributes. Note: This element can only exist in the head section, but it can appear any number of times.rel attribute
The rel attribute is required and specifies the relationship between the current document and the linked document/resource. The syntax is:<link rel="value">The attribute value of this attribute is as follows:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>123</title> <link rel="stylesheet" type="text/css" href="styles.css"> </head> <body> <h1>我是通过样式文件 styles.css 渲染后显示的。</h1> <p>我也是。</p> </body> </html>Output result: (Learning video sharing:
css video Tutorial,html video tutorial)
The above is the detailed content of What do link and rel mean when introducing CSS styles?. For more information, please follow other related articles on the PHP Chinese website!