What this article brings you is about how to insert CSS in HTML? CSS Insert HTML Four ways to introduce (with code), there is a certain reference value, the need for friends can refer to, I hope to help you.
1. Notes:
(1). Comments for HTML:
(2). Comments for CSS:/* *
Ways to insert CSS (cascading style sheets) in 2.HTML
(1). inline style (write style directly behind the label)
<!doctype html>
(2) embedded (separate the style and HTML language)
<!doctype html>
3. External style (linked: CSS and HTML are written separately)!!! Most commonly used
First.html
<!doctype html>
First.css
p{ text-decoration:underline;/* Plus underline */ text-transform:lowercase;/* Capital Letter All lowercase */ text-align:center;/* Center * /font-size:23px;/* Font size * /font-family: blackbody;/* Set font */ font-style:italic;/* set Word tilt */ text-indent : 3px;/* Set First line indent */ color:red;/* Set Font color * /background-color: #ddd;/* Set Background color */ letter-spacing:4px;}
4. Import type
First.html
<!doctype html>
First.css
p{ text-decoration:underline;/* Plus underline */ text-transform:lowercase;/* Capital Letter All lowercase */ text-align:center;/* Center * /font-size:33px;/* Font size * /font-family: blackbody;/* Set font */ font-style:italic;/* set Word tilt * / text-indent:3px;/* Set First Line indent * /color:red;/* Set Font color * /background-color: #ddd;/* Set Background color */ letter-spacing : 4px;}