HTML, CSS & the everyday web
Learn the front-end.
Make it click.
Small, working examples. Clear explanations. A reference you can keep coming back to, from your first HTML tag to your next CSS layout.
Keep a good reference handy.
Look it up. Try it out.Learn by doing
Make a change.
See what happens.
A layout in three lines. Grid creates columns; gap gives them breathing room.
Choose Edit code and change 1fr 1fr to 2fr 1fr. Then update the result to make the first column wider.
HTML and CSS
HTML
<div class="tiles">
<p>First column</p>
<p>Second column</p>
</div>
CSS
/* Teaching code */
.tiles {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 1rem;
}
/* Optional presentation */
.tiles > p {
margin: 0;
padding: 1rem;
background: #f8d8c3;
color: #20211e;
border: 1px solid #20211e;
}
Edit HTML or CSS to update the preview as you type. Copy code snippet copies the selected tab. Preview spacing and font defaults are not included.
Build something useful.
All learning pathsA little more understanding.
All lessons
The fundamentals
Why does that CSS rule win?
Get comfortable with the cascade, specificity, and inheritance.
Read lesson Everyday decisionsFlexbox or Grid?
Choose the layout tool that fits what you’re building.
Read lessonReady for utility classes? Explore the Tailwind CSS lessons