[フレーム]

HTML and CSS Tutorial


Learn HTML & CSS Together

HTML gives your page structure and CSS makes it look great.

This tutorial guides you through both, step by step.

Follow the integrated track to build webpages that are structured, responsive, and beautiful.

Start learning now »

Practice as you go

Every chapter comes with editable examples and exercises so you can test the HTML markup and CSS styling together.


Example

Render a basic card with HTML and CSS:

HTML + CSS Example

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="styles.css" type="text/css">
</head>
<body>
<section>
 <h1>Welcome!</h1>
 <p>This card mixes HTML structure with CSS styling.</p>
 <button>Learn more</button>
</section>
</body>
</html>
body {
 font-family: Arial, sans-serif;
 background-color: #f3f6f9;
 margin: 0;
}
section {
 max-width: 500px;
 margin: 60px auto;
 background: white;
 padding: 24px;
 border-radius: 6px;
}
h1 {
 color: #04AA6D;
}
button {
 background:#04AA6D;
 color:white;
 border:none;
 padding:10px 18px;
 border-radius:4px;
}
Try it Yourself »

Click on the "Try it Yourself" button to see how HTML and CSS work together.



Keep exploring

Ready for more focused study?

Check out the standalone tutorials:

HTML Tutorial CSS Tutorial

This integrated tutorial combines the best of both worlds so you can build real web projects faster.


New

W3Schools Adventure App

Coding fundamentals as a game. Bite-sized lessons and challenges.

Ready to start your journey? Your streak is waiting.
+60 XP
W3Schools Adventure tutor
W3Schools Adventure map
×

Contact Sales

If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
sales@w3schools.com

Report Error

If you want to report an error, or if you want to make a suggestion, send us an e-mail:
help@w3schools.com

FORUM ABOUT ACADEMY
W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning.
Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness
of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookies and privacy policy.

Copyright 1999-2026 by Refsnes Data. All Rights Reserved. W3Schools is Powered by W3.CSS.

AltStyle によって変換されたページ (->オリジナル) /