CSS ?? ????: CSS? ???? ??
????
<style> ??? ?? CSS ???? ?????.
?? ??: <style type = “text/css”></style>
?: <style>? CSS ???? ?? ??? ??? ? ????. ???.
??? ?????? <style> ??? ?? ? ??? ? ????.
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>php.cn</title> <style type="text/css"> h1{ color:red; } </style> </head> <body> <h1>習(xí)近平心中的互聯(lián)網(wǎng)</h1> <p>互聯(lián)網(wǎng)是20世紀最偉大的發(fā)明,它正在將人類“一網(wǎng)打盡”,人們在不知不覺中已經(jīng)融入了互聯(lián)網(wǎng)生態(tài),互聯(lián)網(wǎng)讓世界變成了“雞犬之聲相聞”的地球村。</p> </body> <style type="text/css"> p{ color:blue; } </style> </html>
??
<link> ??( .css)? ?? ?? CSS ??? ?????. ? ?? ?? CSS ??? ?? ?????? ??? ? ????.
<link rel = “stylesheet” type = “text/css” href = “css/public.css” />
<link>??? ?? ??
rel: ?, ?? ??? ??? ????????. ?: ?????
??: ??? ??.
href: ??? CSS ?? ?????.
??:
<link> ??? <head>
??? ????? ?? ?? <??>? ???? ?? ?? ??? ??? ??? ? ????.
??? ???(?? ???) JS ??? ?? ???? ??)
?? HTML ???? ???, ID, ??, ???? ?? ? ?? ?? ??? ????.
HTML ??? ??? ?? ?? CSS? ???? ??? ?????.
??:
??? ?????? CSS ??? ?? ?? ??? ? ????.
??? ?????? ?? CSS ??? ??? ? ????. ?, ? ?? ??? ? ????.
??? ???? ID ????? ????? ?? ????.
?? ???? ???? ? ?? ??? ??????.
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>php.cn</title> <style type="text/css"> h1{ color:green; } .hclass{ color:bule; } #hid{ color:black; } </style> </head> <body> <div> <h1 class="hclass" id="hid" style="color:red">習(xí)近平心中的互聯(lián)網(wǎng)</h1> </div> </body> </html>