Css:- the external styles

    It is written outside the file
    With an external style sheet, you can change the look of an entire website by changing just one file.
    Each page must include a reference to the external style sheet file inside the <link> element. The <link> element goes inside the <head> section.
    Code:-

<!DOCTYPE html> 
<html> 
<head> 
 <meta name="viewport" content="width=device-width, initial-scale=1"> 
 <!--External styles are written in a separate file(.css) and import it through <link> tag--> 
 <link href="css/test.css" type="text/css" rel="stylesheet"> 
</head> 
<body> 
 <div> 
  Test Div 
 </div> 
</body> 
</html> 
<!-- 
"test.css" file contain the following code(No need to write with in <style> tag) 
div{ 
width:100px; 
height:100px; 
background:green; 
-->

Css:- the external styles Css:- the external styles Reviewed by Network security on May 23, 2019 Rating: 5

No comments:

Useful Information

Powered by Blogger.