How to write external link css

藏色散人
Release: 2023-01-05 16:09:42
Original
7064 people have browsed it

External css is written like "", where href represents the css file that needs to be imported.

How to write external link css

The operating environment of this article: Windows 7 system, Dell G3 computer, css3 version.

CSS (Cascading Style Sheets) is used to render styles for HTML element tags. CSS can be added to HTML in the following three ways: inline styles, nested styles, and external styles.

Outline style sheets are ideal when styles need to be applied to many pages. Using external style sheets, you can change the look of your entire site by changing one file.

Let’s take a look at how to write external css.

We can create a new text file, then change the file extension to .css, open this file and directly write the css style in the file. The method of opening css files can be seen here: How to open css suffix files?

When using external link styles, we need to introduce the tag in the tag.

Copy after login

href is the css file that needs to be introduced.

[Recommended learning: css video tutorial]

link tag:

The tag defines the relationship between the document and external resources. The most common use of the

tag is to link style sheets.

Differences between HTML and XHTML

In HTML, the tag does not have a closing tag.

In XHTML, the tag must be closed properly.

Tips and Notes:

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.

The above is the detailed content of How to write external link css. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
css
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!