how to css in html code example
Example 1: connext html file to css
<link rel="stylesheet" type="text/css" href="style.css">
Example 2: 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 3: jquery in html
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
Example 4: css in html
<!-- EXAMPLE -->
<div class="your_class" style="display:none">
<!--[SYNTAX: style="<CSS-code>"] -->
Example 5: CSS IN HTML
<!-- There are 3 ways to do this-->
<!-- #1: Inline CSS-->
<h1 style="color: red;">Red Heading</h1>
<!-- #2 Element CSS-->
<style>
h1 {
color: red;
}
</style>
<h1>Red Heading</h1>
<!-- #3 Stylesheet CSS-->
<link rel="stylesheet" href="[stylesheet link]">
Example 6: !important in css
Syntax:
div {
width: 100% !important;
}