
CSS BASIC
Presentation
•
Computers
•
•
Practice Problem
•
Hard
Prof. Tarik
Used 4+ times
FREE Resource
14 Slides • 0 Questions
1
What is CSS?
CSS is what we will use to make our webpages look nice and unique. They are separate files that we create that can be linked to our HTML to enhance the overall page.
2
Breakdown
Yellow: The first part is the "selector". This lets our HTML know what we are referring to.
Green: The next part is the entire declaration we are making.
Pink: Inside of the { } is where we will "declare" our style choices. "property: value;" pairs.
Orange: The first part of our pair is the "property" which states what type of style we are referring to.
Blue: The second part is the "value" which states the specific setting or numeric value we want to assign.
3
Classes and ID's
A 'class' is an attribute assigned to an HTML element. It can be assigned to as many different elements as we would like. It is best used though for elements that are used for the same purpose.
An 'id' is also an attribute assigned to an HTML element. It is a specific and unique value that cannot be used anywhere else.
4
Selectors and Specificity
General element selectors can be used to style every element in your HTML that matches the selector (least specific)
When a "." starts the selector we are referring to a "class". So any element with an attribute of 'class=bill-images' will be assigned the same style as each other. (more specific)
When a "#" starts the selector we are referring to an "id". Each "id" is unique and can only be applied once. The one element with the attribute of 'id=quote' will be assigned the style choices declared
5
3 Different ways to link CSS to HTML
1) In-line (not best practice, gets messy, hard to keep track of, not DRY)
What is DRY? (Don't Repeat Yourself) The practice of trying to write code that can be used and re-used multiple times instead of writing it over and over and over... and over and over.
2) Inside of the <style></style> element we can put inside of the <head></head> element in our HTML file. (Better than 'in-line', good for learning and working on small activities, still not best practice.)
3) Create a separate file with a ".css" extension and <link> the file to our HTML. (Best practice, keeps our HTML and CSS separate and keeps our code clean. We love clean code.)
6
CSS in-line
Written inside of the HTML element, only pertains to that specific element.
"style='property: value' "
7
CSS <link>'ed!
Using a <link href="bill.css" rel="stylesheet" > inside of our <head> we can then write our CSS in a separate file to keep our code clean and easy to use.
This allows us to use our CSS on any HTML file we want to, by just adding a <link> in that HTML file. This helps with our practice of DRY coding.
8
9
10
11
12
13
14
What is CSS?
CSS is what we will use to make our webpages look nice and unique. They are separate files that we create that can be linked to our HTML to enhance the overall page.
Show answer
Auto Play
Slide 1 / 14
SLIDE
Similar Resources on Wayground
10 questions
Object pronouns
Presentation
•
2nd - 3rd Grade
10 questions
Forms of Energy
Presentation
•
4th - 5th Grade
10 questions
4th-grade ADVERBS
Presentation
•
3rd - 6th Grade
10 questions
Commas in a series
Presentation
•
3rd Grade
10 questions
Big Bang theory
Presentation
•
8th - 9th Grade
10 questions
Simple Interest
Presentation
•
8th Grade
10 questions
Decision Making
Presentation
•
9th - 12th Grade
10 questions
Author's Purpose
Presentation
•
8th - 12th Grade
Popular Resources on Wayground
16 questions
Grade 3 Simulation Assessment 2
Quiz
•
3rd Grade
19 questions
HCS Grade 5 Simulation Assessment_1 2526sy
Quiz
•
5th Grade
10 questions
Cinco de Mayo Trivia Questions
Interactive video
•
3rd - 5th Grade
17 questions
HCS Grade 4 Simulation Assessment_2 2526sy
Quiz
•
4th Grade
24 questions
HCS Grade 5 Simulation Assessment_2 2526sy
Quiz
•
5th Grade
13 questions
Cinco de mayo
Interactive video
•
6th - 8th Grade
20 questions
Math Review
Quiz
•
3rd Grade
30 questions
GVMS House Trivia 2026
Quiz
•
6th - 8th Grade