Welcome to the second course of The Origins Trilogy! 🎨
So far, we've been laying bricks and walls with HTML, but all the web pages are still black & white and lack viiibes.
Let's change that with CSS magic!
CSS, or Cascading Style Sheets, is a styling language that paints a website with colors, fonts, layouts, and animations.
Learn CSS to create stunning web pages, enhances user experience, and makes your site stand out in the digital crowd. Plus, it’s fun to see your design ideas come to life!
It's time to discover your inner Picasso. ✨
Let's see the power of CSS by adding some styles for the website of a pizza shop!
In our code editor on the right, there should already be some HTML loaded into the index.html file tab. Press the "Run" button and see what the page looks like without styles.
Next, copy and paste the following CSS code in the styles.css file tab:
body {
font-family: "Chalkduster", fantasy;
width: 100%;
height: 100vh;
position: absolute;
text-align: center;
}
main {
background-color: tomato;
width: 70%;
margin: auto;
position: relative;
border-radius: 5px;
margin-top: 50px;
}
#hero-copy {
padding: 5px;
}
#hero-img > figure > img {
width: 70%;
border-radius: 10px;
}
footer {
background-color: lightgreen;
height: 100px;
}
footer > p {
padding: 37px;
}
What happens when you press the "Run" button now?
Want the solution? Try completing the lesson first!
index.html
styles.css
01. Picasso
02. Syntax
03. Selectors Pt. 1
04. Selectors Pt. 2
05. Concert Flyer
01. Picasso
10 XP