The meaning and function of link and rel in CSS styles

When writing web pages, we often need to add styles to the web pages to beautify the appearance and layout of the pages. CSS (Cascading Style Sheets) is a language used to describe the style of web pages. In CSS, we can use the link and rel attributes to introduce external style sheets to style the web page.

Link is a tag in HTML that defines the relationship between a document and external resources. rel is an attribute of the link tag, used to specify the relationship type between the document and external resources. When we use the link tag to introduce an external style sheet, the value of the rel attribute is usually set to "stylesheet", indicating that the relationship between the document and the imported style sheet is the style sheet.

Here is an example showing how to use the link and rel attributes to introduce an external style sheet:

<!DOCTYPE html>
<html>
<head>
  

Guess you like

Origin blog.csdn.net/ByteKnight/article/details/133554582