0% found this document useful (0 votes)
25 views

CSS Foundation 1

CSS is used to format HTML elements. CSS syntax uses a target selector followed by a property and value, written as target {property: value;}. CSS can be included inside HTML tags using the style attribute, in the <head> section within <style> tags, or linked externally via a <link> tag pointing to a .css file. A codepen demo is provided to illustrate CSS usage.

Uploaded by

Kkimm Chii
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

CSS Foundation 1

CSS is used to format HTML elements. CSS syntax uses a target selector followed by a property and value, written as target {property: value;}. CSS can be included inside HTML tags using the style attribute, in the <head> section within <style> tags, or linked externally via a <link> tag pointing to a .css file. A codepen demo is provided to illustrate CSS usage.

Uploaded by

Kkimm Chii
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

CSS Foundation 1

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

HTML FILE CSS 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

You might also like