Professional Documents
Culture Documents
MINTER3
what is css
syntax
where to put it
demo
??
CSS is short for
What is Cascading Style Sheets
CSS it formats HTML elements.
css
syntax
target { property: value;}
p { color: violet;}
target {
property: value;
property: value;
}
where to put css
three places:
● inside an html tag
● in the head section
● as a link to separate file
<p>The Philippines has eight major
dialects</p>
inside an html tag
<p style=”color:violet;”>The Philippines
has eight major dialects</p>
inside the head section
<html>
<head>
<style>
p{color:violet;}
</style>
</head>
<body>
<p>The Philippines has eight major
dialects</p>
...
as a link to a separate file
index.html style.css
as a link to a separate file
<html>
<head>
<link rel=”stylesheet” href=”style.css”>
</head>
<body>
<p>The Philippines has eight major
dialects</p>
...
as a link to a separate file
root root
css css
style.css
style.css
index.html
index.html
css/style.css
as a link to a separate file
<html>
<head>
<link rel=”stylesheet”
href=”css/style.css”>
</head>
<body>
<p>The Philippines has eight major
dialects</p>
...
codepen demo