css files are generally called CSS external style sheets, with the extension ".css". When you copy the CSS style code into a text file and save it as a ".css" file, it is an external style sheet. CSS files can be referenced in HTML through the "@import" keyword or the "" tag.
The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.
css files are generally called CSS external style sheets, with the extension ".css".
CSS External Style Sheet
If the CSS style is placed in a file outside the web document, it is called an external style sheet , a CSS style sheet document represents an external style sheet.
In fact, the external style sheet is a text file with the extension .css. When you copy the CSS style code into a text file and save it as a .css file, it is an external style sheet.
External style sheets must be imported into web documents before they can be recognized and parsed by the browser. External style sheet files can be imported into HTML documents in two ways.
1. Use the tag to import
Use the tag to import the external style sheet file:
<link href="001.css" rel="stylesheet" type="text/css" />
For each attribute Description: The
href attribute sets the address of the external style sheet file, which can be a relative address or an absolute address.
The rel attribute defines the associated document, which here indicates that the associated document is a style sheet.
The type attribute defines the type of imported file. Like the style element, text/css indicates a CSS text file.
Generally when defining the tag, three basic attributes should be defined, among which href is a must-set attribute.
You can also add the title attribute in the link element to set the title of the optional style sheet. That is, when a web document imports multiple style sheets, you can select the style sheet file to be applied through the title attribute value. [Recommended tutorials: CSS Video Tutorial, "html Video Tutorial"]
Tip: In the Firefox browser, you can select "View- -> Page Style" option, and then the title attribute value will be displayed in the submenu. Just select different title attribute values to selectively apply the required style sheet file. IE browser does not support this feature.
2. Use the @import keyword to import
Use the @import keyword in the
<style type="text/css"> @import url("001.css"); </style>
After the @import keyword, use the url() function to include the address of the specific external style sheet file.
For more programming related knowledge, please visit: Programming Video! !
The above is the detailed content of What is a css file generally called?. For more information, please follow other related articles on the PHP Chinese website!

I recently found a solution to dynamically update the color of any product image. So with just one of a product, we can colorize it in different ways to show

In this week's roundup, Lighthouse sheds light on third-party scripts, insecure resources will get blocked on secure sites, and many country connection speeds

There are loads of analytics platforms to help you track visitor and usage data on your sites. Perhaps most notably Google Analytics, which is widely used

The document head might not be the most glamorous part of a website, but what goes into it is arguably just as important to the success of your website as its

What's happening when you see some JavaScript that calls super()?.In a child class, you use super() to call its parent’s constructor and super. to access its

JavaScript has a variety of built-in popup APIs that display special UI for user interaction. Famously:

I was chatting with some front-end folks the other day about why so many companies struggle at making accessible websites. Why are accessible websites so hard

There is an HTML attribute that does exactly what you think it should do:


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SublimeText3 Linux new version
SublimeText3 Linux latest version

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

Dreamweaver Mac version
Visual web development tools

Atom editor mac version download
The most popular open source editor