
Concept Notes: HTML & CSS Basics
🔹 1. What is HTML?
- HTML (HyperText Markup Language) is used to create the structure of web pages.
- Uses tags like
<html>
,<head>
,<body>
,<p>
,<h1>
etc. - HTML is not a programming language – it’s a markup language.
Example:
<!DOCTYPE html>
<html>
<head><title>My Page</title></head>
<body>
<h1>Hello, World!</h1>
<p>This is a paragraph.</p>
</body>
</html>
🔹 2. What is CSS?
- CSS (Cascading Style Sheets) is used to style HTML elements (colors, fonts, spacing).
- You can apply CSS:
- Inline – inside HTML element
- Internal – in
<style>
tag - External – in a separate
.css
file
Example:
p {
color: blue;
font-size: 16px;
}
🔹 3. Common HTML Tags
Tag | Use |
---|---|
<h1> to <h6> | Headings |
<p> | Paragraph |
<a> | Anchor/Link |
<img> | Image |
<ul>/<ol> | Lists |
🔹 4. Common CSS Properties
Property | Use |
---|---|
color | Text color |
font-size | Size of text |
background | Background color/image |
margin | Outer spacing |
padding | Inner spacing |
🧠 MCQs – HTML & CSS Basics
1️⃣ What does HTML stand for?
A) HyperText Machine Language
B) HighText Markup Language
C) HyperText Markup Language
D) None
2️⃣ Which tag is used to create a paragraph in HTML?
A) <para>
B) <p>
C) <pg>
D) <text>
3️⃣ What tag is used to create a link in HTML?
A) <link>
B) <a>
C) <href>
D) <url>
4️⃣ Which is the correct CSS syntax to color text red?
A) color = red;
B) text-color: red;
C) {color: red;}
D) color: red;
5️⃣ Which tag inserts an image in HTML?
A) <img>
B) <image>
C) <src>
D) <pic>
6️⃣ CSS can be written in how many ways?
A) 1
B) 2
C) 3
D) 4
7️⃣ Which property is used to set text size in CSS?
A) text-size
B) font-style
C) font-size
D) size
8️⃣ What is the default heading tag with largest text?
A) <h1>
B) <h6>
C) <h3>
D) <title>
9️⃣ The <a>
tag needs which attribute to link a page?
A) src
B) href
C) link
D) target
🔟 What’s the file extension for an external CSS file?
A) .html
B) .style
C) .css
D) .js
✅ Answer Key
Q.No | Answer |
---|---|
1 | C |
2 | B |
3 | B |
4 | D |
5 | A |
6 | C |
7 | C |
8 | A |
9 | B |
10 | C |
🧠 Explanations
- Q1: HTML = HyperText Markup Language.
- Q2: Paragraphs are created using
<p>
. - Q3: Links are defined using
<a href="">
. - Q4: Correct syntax:
color: red;
- Q5: Images use
<img src="..." />
- Q6: CSS can be written inline, internal, or external.
- Q7:
font-size
controls text size. - Q8:
<h1>
is the largest heading by default. - Q9:
<a href="link.html">Click</a>
–href
defines the link. - Q10:
.css
is the correct file extension.
📥 PDF Download
Available now in the Telegram group 👇
👉 @learnnewthingsoffcial
💬 Comment Task
🗣 Which confuses you the most – HTML tags vs CSS selectors?
Let us know in comments. We’ll break it down with animation! 🎥✨