tag in the HTML
">How to reference external CSS files? Using the tag, specify the rel="stylesheet" and href="CSS file path" attributes. Create an external CSS file Save the CSS file to the web server Use the tag in HTML
How to reference in HTML External CSS files
It is easy to reference external CSS files in HTML, just use thetag.
Syntax:
Steps:
.css
extension and styled according to CSS rules.
tag in the HTML code:Add in the
section
tag, specify therel="stylesheet"
andhref="path/to/stylesheet.css"
attributes.href
The value of the property should be the path to the CSS file.Example:
Benefits:
Using external CSS files has the following benefits:
The above is the detailed content of How to reference external css files in html. For more information, please follow other related articles on the PHP Chinese website!