Welcome to HTML & CSS Learning!
This site helps you learn the basics of HTML and CSS with lessons, quizzes, and a live editor.
HTML Basics
1. What is HTML?
HTML stands for HyperText Markup Language. It is the standard language for creating web pages.
2. Basic HTML Structure
<!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> Content goes here... </body> </html>
3. Common HTML Tags
- <h1> to <h6> - Headings
- <p> - Paragraph
- <a> - Links
- <img> - Images
- <ul>, <ol>, <li> - Lists
- <div> and <span> - Containers
CSS Basics
1. What is CSS?
CSS (Cascading Style Sheets) is used to style and layout web pages.
2. Example CSS Code
body {
background-color: lightblue;
}
h1 {
color: navy;
margin-left: 20px;
}
3. How to link CSS
You can add CSS inside a <style> tag in the <head>, or link an external file:
<link rel="stylesheet" href="styles.css">
Try It Yourself
Write your HTML code below and click "Run" to see the result.
Code Snippets:
Quiz: Test Your Knowledge
Lesson Progress
Click a lesson to mark it complete:
- HTML Basics
- CSS Basics