how to use css code example
Example 1: external style sheet
<link rel="stylesheet" type="text/css" href="mystyle.css">
Example 2: how to link css to html
<link rel="stylesheet" href="PathToYourFile.css">
Example 3: how to write css in html
<p style="color: blue; font-size: 46px;">
Example 4: how to link css to html
<link rel="stylesheet" href="file_name.css">
Example 5: CSS IN HTML
<!-- Styles can be inserted in html using <style></style> element -->
<style>
body {
background-color: cyan;
}
</style>
<!--CSS can also be linked using link tag in html
-the link tag is a self-closing tag-->
<link rel="stylesheet" type="text/css" href="filename.css"/>
Example 6: how to use css
<link rel="stylesheet" href="stylesheet.css">
<div class="mydiv"></div>
<style>
.mydiv {
background-color: ;
color: ;
}
</style>