Lesson 11: Styling Elements with CSS
This lesson continues the introduction to CSS style properties, this time focusing more on non-text elements. Students begin this lesson by looking at a website about Desserts of the World. They investigate and modify the new CSS styles on this website, adding their own styles to the page. After working on the Desserts page, students apply their knowledge of new CSS properties to do more styling of their personal websites.
Students will be able to:
- Use CSS properties to change the size, position, and borders of elements.
- Create a CSS rule-set for the body element that impacts all elements on the page.
Warm Up (5 minutes)
Discuss: What Styles Do You Want?
- Yesterday we styled text elements. What other ways do you wish you could style your page?
- Today we are going to learn more properties we can use to style our web pages. Hopefully some of them allow you to add some of the styles we listed in this discussion.
Activity (40 minutes)
Web Lab: Styling Elements with CSS
- Go to code.org Lesson 11
- Do Level 1 together as a class
- Do Levels 2-3 on your own
- Do Level 4 together as a class
- Do Levels 5-11 on your own
- Do Level 12 together as a class
- Do Level 13 on your own
Wrap Up (5 minutes)
- Add the new properties you learned to the CSS Properties page in your journal and to the class poster.
- Reflect on your development of the five practices of CS Discoveries (Problem Solving, Persistence, Creativity, Collaboration, Communication). Choose one of the following to write about.
- Choose one of the five practices in which you believe you demonstrated growth in this lesson. Write something you did that exemplified this practice.
- Choose one practice you think you can continue to grow in. What’s one thing you’d like to do better?
- Choose one practice you thought was especially important for the activity we completed today. What made it so important?