Home > Web Front-end > CSS Tutorial > css is more complicated than html, why use it?

css is more complicated than html, why use it?

青灯夜游
Release: 2020-11-17 15:26:54
Original
2205 people have browsed it

Reason: Pages developed simply using HTML are ugly, and HTML internal tags do not support many styles. Using CSS can beautify HTML pages; and remove most or even all of the presentation information from the web page. Moving them out of HTML files and keeping them in a style sheet can reduce file size and make maintenance easier.

css is more complicated than html, why use it?

[Recommended tutorial: CSS video tutorial]

Since HTML was invented, styles have come in various forms exist. Different browsers combine their own style languages ​​to provide users with control over page effects. The original HTML contained only a few display attributes.

With the growth of HTML, in order to meet the requirements of page designers, HTML has added many display functions. But as these functions increase, HTML becomes more and more complex, and HTML pages become more and more bloated. So CSS was born.

html and css are two different front-end technologies. Pages developed simply using html are ugly, and html internal tags do not support many styles. For example, in html, I want a font to change If it is large, then we can only use the size attribute in the font tag. The maximum font size can only take a value of 7. If it exceeds the maximum font size, it will not take effect.

css technology is used to beautify html pages. For example, in the above example, in css, we can completely change the font elements in html to the size we want according to our own needs, and follow css specifications. I You can use all the units provided by css, such as: cm, px, %, etc.

html is like a girl without makeup. If she wants to become more beautiful, she needs to use cosmetics, and css acts as the cosmetics for html.

And CSS helps achieve responsible web design. CSS has a huge impact on how developers build Web sites, and the impact is likely to be endless. Moving most or even all of the presentation information of a web page out of (X)HTML files and keeping them in a style sheet has many advantages, such as reducing file size, saving network bandwidth, and ease of maintenance. In addition, the separation of the site's performance information and core content allows site designers to make various modifications to the entire site in a short period of time.

CSS simplifies the format code of the web page, and the external style sheet will also be saved in the cache by the browser, speeding up the download and display speed, and also reducing the amount of code that needs to be uploaded (because repeated formatting will is saved only once). As long as you modify the CSS style sheet file that saves the website format, you can change the style and characteristics of the entire site. It is particularly useful when modifying a site with a large number of pages. This avoids modification of web pages one by one and greatly reduces the workload.

For more programming-related knowledge, please visit: Programming Learning! !

The above is the detailed content of css is more complicated than html, why use it?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
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