What is CSS?
CSS=Cascading Style SheetsStyle rules: Selector{declaration;}
Declation: Property:value

Comments
/*......*/
Inline
Set style attribute in HTML elements
<h1 style="color:blue">This is a blue headings</h1>
<style>
body {background-color: black;}
h1 {color: blue;}
p {color: red;}</style>
</head>
by using an external CSS file
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="styles.css">
</head>
<body>
body {
background-color: blue;}
h1 {
color: blue;}
p {
color: red;}
<head>
<link rel="stylesheet" type="text/css" href="mystyle.css">
<style>
h1 {
color: orange;}</style>
</head>
Internal
Use<style>
element in the <head>
section<style>
body {background-color: black;}
h1 {color: blue;}
p {color: red;}</style>
</head>
External
by using an external CSS file
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="styles.css">
</head>
<body>
body {
background-color: blue;}
h1 {
color: blue;}
p {
color: red;}
<head>
<link rel="stylesheet" type="text/css" href="mystyle.css">
<style>
h1 {
color: orange;}</style>
</head>
Comments
Post a Comment