Website Buildin...LOGIN
Website Building Guide
author:php.cn  update time:2022-04-01 15:26:43

CSS Guide



CSS - Cascading Style Sheets

CSS defines how to display HTML elements.

CSS describes the visual style (appearance, layout, color, font) of HTML elements.

CSS is a separately designed file (thus greatly increasing the flexibility of HTML and reducing the complexity of HTML).

CSS is simple and easy to learn. You can treat an HTML element as a selector and list the style properties within curly braces

CSS Example

body
{
background-color: #d0e4fe;
}
h1
{
color:orange;
text-align:center;
}
p
{
font-family: "Times New Roman";
font-size:20px;
}

Try it»

Click the "Try it" button to view the online example

Style sheets greatly improve work efficiency

Style sheets define how to display HTML elements. Font tags and color attributes in styles such as HTML 3.2 are usually saved in external .css files. .

External style sheets give you the ability to change the appearance of all page layouts in your site simultaneously by editing a simple CSS document.

CSS can be called a breakthrough in the field of WEB design because it allows the style and layout of multiple pages to be controlled at the same time. As a website developer, you can define styles for each HTML element and apply them to as many pages as you wish. To make a global transformation, simply change the style and all elements in your site will be updated automatically.

Another CSS Example


How to learn CSS?

Learn our complete CSS tutorial

Learn our complete CSS reference manual

php.cn