G5_C3
Introduction to CSS
![](https://s3.amazonaws.com/media-p.slid.es/imports/1497887/IqPWw4e4/fc7fb29ad226b54d0880e5d6dc465e08.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1525749/images/8522409/Class1-01.png)
![](https://s3.amazonaws.com/media-p.slid.es/imports/1525327/rF1gImw0/dcfff8b19e27817d446ab12b859318a1.png)
***NOTE FOR ILLUSTRATOR***
Image of CSS written on computer screen and dodo standing next to it
CLASS STRUCTURE
FOR PREPARATION & REFERENCE
Activity No: |
Slide No. |
Topic | Time |
---|---|---|---|
1 | 4 | Ice Breaker activity | 2 |
2 | 5-7 | Warm up quiz | 4 |
3 | 9-13 | Introduction to CSS | 12 |
4 | 14 | Way of adding CSS | 14 |
5 | 15-24 | Teacher Activity1-3 | 5 |
6 | 26-32 | Student Activity 1 -2 | 3 |
7 | 34 | Wrap Up Quiz | |
8 | 35-36 | Student Additional Activity |
TA : Teacher Activity
SA : Student Activity
SAA : Student Additional ActivityΩ
Topic
Slide
No.
Slide No. |
Topic |
---|---|
2 | Class Structure |
3 | Class Prerequisites |
16-17 | TA Code solution |
19 | TA Code solution |
21-23 | TA Code solution |
36 | SAA |
PRE REQUISITES
FOR TEACHER
-
Computer with internet connection
-
Latest browser installed
-
Projector to present screen
FOR STUDENTS
-
Computer with internet connection
-
Latest browser installed
Which is your favorite sport and why?
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1506888/images/8416695/icebreaker_image.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8671013/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8671032/VAS_Professional_quiz_time-20.jpeg)
How many heading tags does HTML have?
A. 2 tags
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8612862/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8612864/pasted-from-clipboard__1_.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8608023/Screen_Shot_2021-05-26_at_1.05.15_PM.png)
B. 5 tags
C. 5 tags
D. 6 tags
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8625525/ADV-C7-28.gif)
Warm-Up Quiz
Where did we create the changecolor() function?
B. style.css
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8600404/Screen_Shot_2021-05-24_at_4.40.38_PM.png)
A. script.js
C. index.html
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8625525/ADV-C7-28.gif)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1512755/images/8412889/WHJ-W-Logo-Slides-01.png)
Let's move ahead.
Excellent!
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8625587/WHJ-Building-Fire-ADV-C6-01-06.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8625631/Screen_Shot_2021-05-31_at_4.28.14_PM.png)
Hi, My name is Daisy
***note for Illustrator ***
GIF1 Daisy waving hand
GIF2 of a teacher giving instructions to the class
In the talk bubble "Create an About Me on your notebook"
Students: Ok MA'AM
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8672345/Screen_Shot_2021-06-14_at_1.45.55_PM.png)
Hi, My name is Daisy
***For Illustrator reference***
GIF1 Daisy at home on her study table.
Camera shift on her notebook she writes "About herself"
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8672357/06WRITING_GIF-facebookJumbo.gif)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8672360/Screen_Shot_2021-06-14_at_1.50.03_PM.png)
About Me
Hi, My name is Daisy. I study in 5th class.
I love to write and and draw.
In My free time I play outdoor games.
***For Ilustrator reference***
GIF 1:
Think Bubble: Let me use colors to beautify my page.
About Me
Hi, My name is Daisy. I study in 5th class.
I love to write and paint.
I love to code and I am a Ninja Coder
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8672391/Screen_Shot_2021-06-14_at_1.59.31_PM.png)
***For Ilustrator reference***
About Me page has a color and About me written with Crayon color and some flowers are made on it
***For Ilustrator reference***
GIF 2:
Teacher praising her for her work.
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8672345/Screen_Shot_2021-06-14_at_1.45.55_PM.png)
Hi, My name is Daisy
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8646041/GIF.gif)
***For Ilustrator reference***
Image 1 and 2 before after of About Me page.
GIF2- Gmail page without CSS and with CSS
About Me
Hi, My name is Daisy. I study in 5th class.
I love to write and draw.
In My free time, I play outdoor games.
About Me
Hi, My name is Daisy. I study in 5th class.
I love to write and paint.
I love to code and I am a Ninja Coder
CSS (Cascading Style Sheets) is used to format the layout of the webpage
Color
Font
Text Size
Background
Some Changes CSS can do
Image Size
***For Illustrator reference***
Add GIFs of all changes
GIF1- background of a website changes
GIF2-
Color of the text changes
GIF3-
Font size Changes
GIF4-
Text size changes
GIF5-
Images size changes in a website
Ways of Adding CSS to HTML
Inline
Internal
External
***For Ilustrator reference***
GIF1-
Shows how Inline is added
GIF2-
Shows how Internal is added
GIF3-
Shows how External is added
Activity
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8626563/Screen_Shot_2021-05-31_at_8.57.45_PM.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8629276/Screen_Shot_2021-06-01_at_4.10.12_PM.png)
TA STEPS
1. Click on the Link
2. Click on Fork
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8626609/Screen_Shot_2021-05-31_at_9.13.21_PM.png)
TA STEPS
Revise the code concepts from the previous class
<body>
<h1>All About Me</h1>
<img src="girl.jpg">
<p>Hey, my name is <i>Ria Sharma.</i> I am 10 years old.<br>
I am in Grade 5 and I study in City public school.
I am a <b>Junior Developer</b>.
I love to code and create websites!</p>
<h2>My Hobbies</h2>
<p>I like to draw and play outdoor games. </p>
<h3>My Favourite Foods</h3>
<p>I love to eat chinese cuisine. </p>
</body>
1st way: Inline CSS
1. An inline CSS defines the "style" attribute of a single HTML element
2. Add "style" element to "<h1>" and "<p>" tags and run the project
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8754875/Screen_Shot_2021-07-11_at_11.20.18_PM.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8612466/Screen_Shot_2021-05-27_at_12.40.15_PM.png)
Inline Solution
1st way: Inline CSS
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1525749/images/8521140/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8646432/Screen_Shot_2021-06-07_at_12.19.06_AM.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8754875/Screen_Shot_2021-07-11_at_11.20.18_PM.png)
2nd way: Internal CSS
1. An internal CSS defines the "<style>" attribute of a single HTML page.
2. Define "<style>" tag inside "<head>" tag as mentioned in the image
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8612466/Screen_Shot_2021-05-27_at_12.40.15_PM.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8669257/Screen_Shot_2021-06-13_at_2.26.05_AM.png)
2nd way: Internal CSS
***For Ilustrator reference***
Add GIF of working of code
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1525749/images/8521140/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8646432/Screen_Shot_2021-06-07_at_12.19.06_AM.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8669257/Screen_Shot_2021-06-13_at_2.26.05_AM.png)
3rd way: External CSS
1. An external CSS defines the "style" attribute of many HTML pages
2. To use an external style sheet, add a link to it in the "<head>" section of the HTML page:
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8628788/Screen_Shot_2021-06-01_at_1.38.17_PM.png)
Specifies the location of linked documents
Specifies the relation b/w current document & linked document
Specifies the media type of linked document
3rd way: External CSS
3. In the "Files" section, go to the "style.css" file.
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8629074/Screen_Shot_2021-06-01_at_3.09.56_PM.png)
3rd way: External CSS
External Solution
4. Add the changes you want to do.
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8629080/Screen_Shot_2021-06-01_at_3.12.23_PM.png)
Changes the background color of the page
Aligns the texts
Changes the color of h1 tags to blue
Changes the color of all the paragraphs to red
Add extra notes for the teacher
As explained in the next slide
3rd way: External CSS
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8629080/Screen_Shot_2021-06-01_at_3.12.23_PM.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8628788/Screen_Shot_2021-06-01_at_1.38.17_PM.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1525749/images/8521140/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8646432/Screen_Shot_2021-06-07_at_12.19.06_AM.png)
***For Illustrator reference***
same GIF student highlighting multiple paragraphs on the book by flipping pages.
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8612279/WHJ-Lets-Code-ADV-C5-01-01.png)
Text
Student Activity
1. Search for bit.ly/activityc3
2. Click on Fork
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8629367/Screen_Shot_2021-06-01_at_4.31.26_PM.png)
Text
Student Activity
Output
Input
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8754888/Screen_Shot_2021-07-11_at_11.26.03_PM.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8754890/Screen_Shot_2021-07-11_at_11.25.09_PM.png)
Before
After
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8669280/Screen_Shot_2021-06-13_at_3.01.27_AM.png)
Text
Student Activity
Output
Input
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8669271/Screen_Shot_2021-06-13_at_2.42.39_AM.png)
Before
After
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8754901/Screen_Shot_2021-07-11_at_11.30.38_PM.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8669288/Screen_Shot_2021-06-13_at_3.19.58_AM.png)
Student Activity
Search for bit.ly/activityc3a in a new tab and click on
Hint: Link external CSS and press Run
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8628788/Screen_Shot_2021-06-01_at_1.38.17_PM.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8599632/Screen_Shot_2021-05-24_at_12.57.17_PM.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8612466/Screen_Shot_2021-05-27_at_12.40.15_PM.png)
External CSS
Run and check output
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8754904/Screen_Shot_2021-07-11_at_11.33.23_PM.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8754908/Screen_Shot_2021-07-11_at_11.35.29_PM.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8671032/VAS_Professional_quiz_time-20.jpeg)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8612862/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8612864/pasted-from-clipboard__1_.png)
Wrap-Up Quiz
How many ways are there to add CSS?
A. 2 ways
B. 3 ways
C. 1 way
D. 4 ways
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8625525/ADV-C7-28.gif)
Inline CSS
Internal CSS
External CSS
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8678666/pasted-from-clipboard.png)
Wrap Up Quiz
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8612862/pasted-from-clipboard.png)
Which type of CSS is shown in the image?
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8612864/pasted-from-clipboard__1_.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8629524/Screen_Shot_2021-06-01_at_5.12.30_PM.png)
A. Internal CSS
B. Inline CSS
C. External CSS
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8625525/ADV-C7-28.gif)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8678666/pasted-from-clipboard.png)
This is an example of "Internal CSS" as you can see "<style>" tag is added in "index.html" file.
Additional Challenge 1
TO DO: Add a button and change the alignment of the text.
Additional Challenge Link:
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8754913/Screen_Shot_2021-07-11_at_11.39.05_PM.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8754912/Screen_Shot_2021-07-11_at_11.39.46_PM.png)
index.html
Additional Challenge 1 Code
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8754925/Screen_Shot_2021-07-11_at_11.44.57_PM.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8754929/Screen_Shot_2021-07-11_at_11.46.03_PM.png)
TO DO: Add a button and change the alignment of the text.
Additional Challenge 2
TO DO: In the same code, change the background color of the screen to powderblue by implementing "internal css"
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8754941/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8754942/pasted-from-clipboard.png)
Hint:
Implement the changes in "index.html" page
Additional Challenge 2 Code
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1888389/images/8754947/Screen_Shot_2021-07-12_at_12.00.48_AM.png)
TO DO: In the same code, change the background color of the screen to powderblue by implementing "internal css"
![](https://s3.amazonaws.com/media-p.slid.es/imports/1497414/zcV4EUWd/640a177a9fba4e063668004b8f1a8a43.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1497414/images/8064926/WHJ-Thank-You-ADV-C4-01-01.png)
Activity Number | Activity Name | Links |
---|---|---|
Teacher Activity | All About Me | https://replit.com/@AkshitSharma8/G5C3TATemplate |
Teacher Activity 1 Solution | All About Me(Inline CSS) | https://replit.com/@AkshitSharma8/G5C3TAInlineSolution |
Teacher Activity 2 Solution | All about Me(Internal CSS) | https://replit.com/@AkshitSharma8/G5C3TAInternalSolution#index.html |
Teacher Activity 3 Solution | All about Me(External CSS) | https://replit.com/@AkshitSharma8/G5C3TAExternalSolution#index.html |
Student Activity 1 | All About Me | https://replit.com/@AkshitSharma8/G5C3SATemplate |
Student Activity 2 | All About Me(using External CSS) | https://replit.com/@AkshitSharma8/G5C3SAExternalTemplate#index.html |
LINKS
Grade 5 Session 3
By Akshit Sharma
Grade 5 Session 3
- 181