1. Agenda
1- Warm up revision about CSS 10 min
2- ppt teacher demonstrate about CSS 15m
3- 3 Videos about layout and Developer Tools each of
5min
4- Practical work Students divided in pairs and use
notepad or Atom , explorer to create very simple web
page using CSS15m
7- Questions and answers as pretest about CSS 5 min
8-Refelection 5 min
9- Home work 5 min
CSS
2. LO CS.1.06 - Identify
and explain the
addition of a style to
web site by using
cascading style sheets
(CSS).
Lesson plan
CSS
7. CSS Syntax
CSS is composed of style rules that the
browser interprets and then applies to the
corresponding elements in your document.
A style rule has three parts: selector, property,
and value.
For example, the headline color can be defined
as:
h1 { color: orange; }
9. internal styles : are defined within
the <style> element, inside
the head section of an HTML page.
<head>
<style>
p {
color:white;
background-color:gray;
}
</style>
</head> 9
CSS
12. Grouping styles
12
p, h1, h2 {
color: green;
}
h2 {
background-color: yellow;
} CSS
This paragraph uses the above style.
output
This h2 uses the above styles.
• A style can select multiple elements separated by
commas
• The individual elements can also have their own styles
CS380
13. CSS comments /*…*/
13
/* This is a comment.
It can span many lines in the CSS file. */
p {
color: red; background-color: aqua;
} CSS
• CSS (like HTML) is usually not commented as
rigorously as programming languages such as Java
• The // single-line comment style is NOT supported in
CSS
• The <!-- ... --> HTML comment style is also NOT
supported in CSS
CS380
15. Inheriting styles
15
body { font-family: sans-serif; background-color: yellow;
}
p { color: red; background-color: aqua; }
a { text-decoration: underline; }
h2 { font-weight: bold; text-align: center; }
CSS
This is a heading
• A bulleted list output
• when multiple styles apply to an element, they are
inherited
• a more tightly matching rule can override a more
general inherited rule
A styled paragraph. Previous slides are available on the website.
CS380
16. Styles that conflict
16
p, h1, h2 { color: blue; font-style: italic; }
h2 { color: red; background-color: yellow; }
CSS
This paragraph uses the first style above.
output
• when two styles set conflicting values for the same
property, the latter style takes precedence
This heading uses both styles above.
CS380
17. CSS properties for fonts
property description
font-family which font will be used
font-size how large the letters will be drawn
font-style used to enable/disable italic style
font-weight used to enable/disable bold style
CS380 17
Complete list of font properties (http://www.w3schools.com/css/css_reference.asp#fo
18. CSS properties for text
property description
text-align alignment of text within its element
text-decoration decorations such as underlining
line-height,
word-spacing,
letter-spacing
gaps between the various portions of
the text
text-indent
indents the first letter of each
paragraph
CS380 18
Complete list of text properties (http://www.w3schools.com/css/css_reference.asp#te
19. Boxes (Content – Padding
– Border - Margin)
Listen to this video
Offline On line
Offline On line
CSS
22. What we learn today
1.Change the layout of a
web page.
2. Access Developer
Tools in your browser
22
CSS
23. 2. Change the layout of a web
page.
23
CSS
Listen to this video
Offline
On line
CSS Auto Adjusting Stretch Fit Web Site
Layout Tutorial HTML5 Template
24. 2. Change the layout of a web
page.
24
CSS
Listen to this video
Offline
On line
Window Size Responsive CSS Layout
Stylesheet Change JavaScript Tutorial
30. 2. Change the layout of a web
page.
30
CSS
https://www.w3schools.com/bootstrap/boot
strap_get_started.asp
Bootstrap
31. 31
CSS• Bootstrap. Advantages of Bootstrap:
• Easy to use: Anybody with just basic
knowledge of HTML and CSS can start using
Bootstrap
• Responsive features: Bootstrap's responsive
CSS adjusts to phones, tablets, and desktops
• Mobile-first approach: In Bootstrap 3, mobile-
first styles are part of the core framework
• Browser compatibility: Bootstrap is
compatible with all modern browsers (Chrome,
Firefox, Internet Explorer, Edge, Safari, and
Opera)
32. 2. Change the layout of a web
page.
32
CSS
• Downloading Bootstrap
• If you want to download and host
Bootstrap yourself, go
to getbootstrap.com, and follow
the instructions there.
34. 2. Change the layout of a web
page.
34
CSS
•Flexbox is a new layout mode in
CSS3.
• Use of flexbox ensures that elements
behave predictably when the page layout
must accommodate different screen sizes
and different display
devices. Disadvantages: Does not work
in IE10 and earlier.
• https://www.w3schools.com/css/tryit.asp?fi
lename=trycss3_flexbox_flex-
wrap_nowrap8
35. 2. Change the layout of a web page.
35
CSS
CSS Layout - float and clear
*The CSS float property specifies
how an element should float.
*The CSS clear property specifies
what elements can float beside
the cleared element and on which side.
36. 3. Access Developer Tools in
your browser.
36
CSS
Listen to this video
Offline
On line
14 Firefox Developer Tools You Might Not
Know About
37. 3. Access Developer Tools in
your browser.
37
CSS
Listen to this video
Offline
On line
Debugging JavaScript - Chrome DevTools
101
41. 3. Access Developer Tools in
your browser.
• In google chroume press
F12
• Ctrl+shift +C
41
CSS
42. 42
Learn and practice through on line web sites
http://www.w3schools.com/tags/tag_div.asp
http://www.quackit.com/html_5/tags/html_div_tag.cfm
https://www.sololearn.com/Course/HTML/
https://www.freecodecamp.org
CSS
44. Prepare for next week
according to student’s law
Gn=Wn % Ng
5. Selectors (Type - Class
and ID). 6. External CCS file.
7. Boxes (Content –
Padding – Border - Margin).44
CSS
45. Reflection
• What is your goal to accomplish in
next week End Using HTML and CSS?
CSS
46. Home work (s. proj.) 1
• Create /design a web page using
HTML/CSS to show a project /hoppy /skill
of your favorites following the bellow
rubric .
46
CSS
47. rubaric
47
CSS
Blue
Design a profficinal web page which contains CSS
Elements such as 1- Selectors (Type - Class and ID).
2. External CCS file.3. Boxes (Content – Padding –
Border - Margin)
Green
Design a normal web page which contains CSS
Elements suchas 1- Selectors (Type - Class and ID).
2. External CCS file.3. Boxes (Content – Padding –
Border - Margin).
Yellow missing two points of green level.
Read a web page haven't includding any CSS elemnets .
49. 49
Learn and practice through on line web sites
https://www.thewebevolved.com
https://www.123test.com/
https://www.wscubetech.com/
https://www.w3schools.com/php/php_quiz.asp
https://www.guru99.com
https://codescracker.com/exam/review.php
https://www.arealme.com/left-right-brain/en/
https://www.javatpoint.com/c-quiz
https://www.proprofs.com/
https://www.geeksforgeeks.org/
https://www.tutorialspoint.com
https://www.sololearn.com/Course/HTML
http://www.littlewebhut.com/
CSS