Method 1
Referencing CSS using the Import method
1 <!DOCTYPE HTML>2 <HTMLxmlns= "http://www.w3.org/1999/xhtml">3 <Head>4 <Metahttp-equiv= "Content-type"content= "text/html; charset=utf-8"/>5 <title>Controlling DOM Objects</title>6 <styletype= "Text/css" >7 @import url (.. /CSS/1-3.CSS); /*referencing CSS using the Import method*/8 </style>9 <Scripttype= "Text/javascript"src=".. /jquery/jquery-2.1.4.min.js ">Ten </Script> One </Head>
Method 2
Referencing CSS using link
1 <!DOCTYPE HTML>2 <HTMLxmlns= "http://www.w3.org/1999/xhtml">3 <Head>4 <Metahttp-equiv= "Content-type"content= "text/html; charset=utf-8" />5 <title>A chained notation of jquery events</title>6 <Linktype= "Text/css"rel= "stylesheet"href=".. /css/1-2.css " /> <!--referencing CSS using link -7 <Scripttype= "Text/javascript"src=".. /jquery/jquery-2.1.4.min.js ">8 </Script>9 <Scripttype= "Text/javascript"> - </Script> in </Head>
Method 3
Write the CSS code directly on the HTML page in the following format:
1 <!DOCTYPE HTML>2 <HTMLxmlns= "http://www.w3.org/1999/xhtml">3 <Head>4 <Metahttp-equiv= "Content-type"content= "text/html; charset=utf-8" />5 <title></title>6 <styletype= "Text/css">7 . Divframe{8 width:260px;9 Border:Solid 1px #666;Ten font-size:10pt; One } A - . Divtitle{ - Background-color:#666; the padding:5px; - } - - . Divcontent{ + padding:5px; - Display:None; + } A at . Divcurrcolor{ - Background-color:Red; - } - </style> - </Head> - <Body> in </Body> - </HTML>
HTML page reference CSS