Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to introduce css in head area

2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)05/31 Report--

This article introduces the knowledge of "how to introduce css in head area". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Introduction method: 1, use style tag to introduce, syntax "css code"; 2, use link to introduce, syntax "".

The operating environment of this tutorial: windows7 system, CSS3&&HTML5 version, Dell G3 computer.

There are two ways to introduce css into the head area:

Internal stylesheet-defined with style tags

External stylesheets-introduced with link tags

1. Internal stylesheet-defined with style tags

Write the css code centrally in the head header tag of the HTML document and define it with the style tag. The basic syntax format is as follows:

Css code

In syntax, the style tag is usually placed after the head tag, or you can place it anywhere in the HTML document.

General format of css code:

Css selector {attribute: value; attribute: value;.}

2. External stylesheets-- introduced with link tags

Place all styles in one or more external stylesheet files with the extension CSS, and link the external styles to the HTML document through link tags, with the basic syntax format as follows:

Rel attribute: defines the relationship between the current document and another linked document. "stylesheet" indicates that the linked document is a stylesheet file.

Href attribute: defines the URL of the linked external stylesheet file, either relative or absolute

This is the end of the introduction of how to introduce css in the head area. Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report