How to insert Cascade Style Sheet [CSS] code into HTML page

There are some way and some sector to use CSS . CSS mean Cascade Style Sheet. It help to design with colour, size, location and position.

To insert a separate CSS file you should follow the below rolls:






<link rel="stylesheet" type="text/css" href="mystyles.css" media="screen" />





To embed CSS into the HTML follow the below instruction:






<style media="screen" type="text/css">
Add style rules here

</style>





Adding Inline CSS to HTML tags. For this follow the below tutorial:







<h2 style="color:red;background:black;">This is the red heading with a black background</h2>



Follow this way to import a CSS file from within CSS:


@import "newstyles.css";


It is the short only one code for use CSS. Stay with us to know more details.