In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the relevant knowledge of "how to quote CSS files to html pages". The editor shows you the operation process through actual cases. The method of operation is simple, fast and practical. I hope this article "how to quote CSS files to html pages" can help you solve the problem.
Using different methods to reference css stylesheets, the final effect is the same, but using different methods to apply css files will affect the efficiency of SEO and web page opening speed.
1. Embed css style directly in html tag elements, for example, I am div css test content-www..com support
2. In the head section of the html header, the style declaration inserts the code as follows:
3. Use @ import to reference external CSS files
Css reference method example-www..com test example
I am div css test content www..com support
Code in Wcss.css file .ceshi {font-size:14px; color:#FF0000;}
You can see that using this method has something in common with using the BYOD reference css stylesheet method, which requires the use of style tags to reference the external css within the head of the html.
4. Use link to call the external css file
Place it in head to call the external wcss.css file to implement the html reference css file
This method does not require style tags, but refers to external styles directly through link a style.
It is generally recommended to use link to refer to external css style methods.
Advantages of using link to reference external css
1, conducive to SEO, using this method to reference external css files, will make the html page source code much less than directly adding the css style, because the search engine spider crawls the page is not crawling css files, which makes the html source code is very few, so that spiders crawl faster, less processing, increasing the weight of this page, conducive to ranking.
2. Saving html makes browsers download web pages with separate threads, just like loading a page with two lines opening a page at the same time, making the page open very fast. (when users browse this page, the html source code and css files are downloaded at the same time, which makes it faster.)
3. It is convenient to modify the style of the web page. You only need to modify the css style to modify the artistic style of the web page. If this method is used in the website project, because the basic css style is shared throughout the site, it is quick and convenient to modify the style of the whole site.
This is the end of the introduction on "how to quote CSS files into html web pages". Thank you for reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.