Home > Web Front-end > Front-end Q&A > How to introduce external JS files and CSS style files into web pages

How to introduce external JS files and CSS style files into web pages

青灯夜游
Release: 2023-01-04 09:37:51
Original
6338 people have browsed it

In a web page, you can use the "

tag pair to introduce external style sheet files, and use html rules to introduce external css.

The tag defines the relationship between the document and external resources. The most common use of the tag is to link style sheets.

Syntax:

<link rel="stylesheet" href="css文件路径" type="text/css" />
Copy after login

2. Import css external files through import

CSS @import rules are used to import style rules from other style sheets. These rules must precede all other types of rules, and @import cannot be used in rules of a conditional group.

@import Rule Grammar

@import url("文件路径");
Copy after login

For more programming-related knowledge, please visit: Programming Course! !

The above is the detailed content of How to introduce external JS files and CSS style files into web pages. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template