Home>Article>Web Front-end> How to introduce external JS files and CSS style files into web pages
In a web page, you can use the "3f1c4e4b6b16bbbd69b2ee476dc4f83a" tag and use the src attribute of the tag to introduce external js files. You can use the "2cdf5bf648cf2f33323966d7f58a7f3f" tag in the head tag of a web page to introduce an external css style sheet file; or use "@import url("file path");" to introduce an external css style sheet file.
The operating environment of this tutorial: windows7 system, JavaScript1.8.5&&css3 version, Dell G3 computer. This method is suitable for all brands of computers.
Recommended:javascript video tutorial,css video tutorial
Methods to introduce external JS files into web pages
You can introduce external js files through the src attribute of the 3f1c4e4b6b16bbbd69b2ee476dc4f83a tag.
Although the 3f1c4e4b6b16bbbd69b2ee476dc4f83a tag has many other attributes, these attributes are not commonly used, or they all have default values, and these default values usually do not need to be changed, so the src attribute may be the only one you need to know. properties.
JavaScript的引入
This way the server will send the JavaScript file to the browser with the MIME type application/x-javascript.
Methods to introduce external CSS files into web pages
1. Introduce external css files through 2cdf5bf648cf2f33323966d7f58a7f3f
In the
of the web page use 2cdf5bf648cf2f33323966d7f58a7f3f tag in ;9c3bca370b5104690d9ef395f2c5f8d1 pair to introduce external style sheet files, and use html rules css. < p> >The2cdf5bf648cf2f33323966d7f58a7f3f tag defines the relationship between the document and external resources. The most common use of the 2cdf5bf648cf2f33323966d7f58a7f3f tag is to link style sheets.
Syntax:
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("文件路径");
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!