The content comes from HTML dog.
The format of CSS is 'property:value'
There are three ways to insert CSS styles into HTML: inline, internal CSS, external CSS files, as follows:
<style= "color:red">text</p>
<!DOCTYPE HTML><HTML><Head><title>CSS Example</title><style>P{Color:Red; }a{Color:Blue; }</style>...
<! DOCTYPE HTML > < HTML > < Head > < title > My First Web page</title> <link rel= "stylesheet" href= "Style.css" ></head>...
CSS to set the style of HTML, first must first get the HTML element selector,
The simplest selector is to use the HTML element name directly, as shown below
Units of measure in CSS:
Colors in CSS:
There are two representations, and some predefined colors, and CSS3 has some advanced settings.
Text in CSS
Different computers have different fonts, and sometimes the fonts you set are not valid on other computers.
But there are also some safe fonts, such as: Arial,verdana, Times New Roman, etc.
The insurance method is to set multiple fonts (separated by commas), so that the browser can not find the first font in the case of the search for a second font, go down
Note that if the font is more than one word, you should put it in double quotes, such as font-family: "Times New Roman" .
Here are a few font-related CSS properties:
Add: Font-size is to modify the text size, a variety of dashes are text-decoration, in the overall style there are some of the following
But I don't think it will be used often.
CSS Beginner's Guide