Which file is commonly used as the main HTML page of a simple website?
Anonymous Quiz
4%
A. main.css
3%
B. script.js
92%
C. index.html
1%
D. app.json
❤1
Which file is primarily responsible for webpage structure?
Anonymous Quiz
13%
A. .css
78%
B. .html
5%
C. .js
4%
D. .json
Which file is primarily used for styling a webpage?
Anonymous Quiz
91%
A. style.css
6%
B. index.html
2%
C. script.js
1%
D. server.js
What does ../ generally mean in a relative file path?
Anonymous Quiz
18%
A. Open the current file
52%
B. Go up one directory
23%
C. Open the root website
7%
D. Go to the database
❤1
What does a relative path describe?
Anonymous Quiz
88%
A. A way to locate a file relative to the current location
9%
B. A database connection
2%
C. A web server
1%
D. A Git branch
❤1
What is the main purpose of organizing files into folders?
Anonymous Quiz
92%
A. To make the code easier to find, understand, and maintain
2%
B. To increase Internet speed
5%
C. To automatically deploy the website
2%
D. To replace HTML
𝗙𝗥𝗘𝗘 𝗥𝗲𝘀𝗼𝘂𝗿𝗰𝗲𝘀 𝗧𝗼 𝗟𝗲𝗮𝗿𝗻 𝗔𝗜 𝗶𝗻 𝟮𝟬𝟮𝟲🚀
Explore 6 free resources covering AI fundamentals, tools, deep learning, research and real-world applications.
✅ 100% Free Learning
✅ Beginner-Friendly
✅ AI • ML • Deep Learning
✅ Real-World Applications
🔗 𝗘𝘅𝗽𝗹𝗼𝗿𝗲 𝗙𝗥𝗘𝗘 𝗖𝗼𝘂𝗿𝘀𝗲𝘀 👇
https://pdlink.in/4AFHq5R
📢 Share this valuable opportunity with your friends and classmates!
Explore 6 free resources covering AI fundamentals, tools, deep learning, research and real-world applications.
✅ 100% Free Learning
✅ Beginner-Friendly
✅ AI • ML • Deep Learning
✅ Real-World Applications
🔗 𝗘𝘅𝗽𝗹𝗼𝗿𝗲 𝗙𝗥𝗘𝗘 𝗖𝗼𝘂𝗿𝘀𝗲𝘀 👇
https://pdlink.in/4AFHq5R
📢 Share this valuable opportunity with your friends and classmates!
❤1
🌐 Web Development Roadmap — Part 12
🏗️ HTML — What Is HTML and Why Do We Need It?
HTML is the first major technology we'll learn for building websites.
1️⃣ What Is HTML?
HTML stands for:
HyperText Markup Language
HTML is the standard markup language used to structure content on webpages.
In simple words:
For example, a webpage might contain:
• A heading
• Paragraphs
• Images
• Links
• Buttons
• Lists
• Forms
• Tables
HTML provides the structure for these elements.
2️⃣ HTML Is Not a Programming Language
This is an important distinction.
HTML is a markup language, not a programming language.
HTML describes the structure and meaning of content.
For example:
There is no programming logic here.
We're simply telling the browser:
and:
JavaScript, on the other hand, can perform programming logic:
So remember:
• HTML → Structure
• CSS → Appearance
• JavaScript → Behaviour and logic
3️⃣ How HTML Works
HTML uses elements to describe content.
For example:
The browser interprets this as a heading.
Another example:
The browser interprets this as a paragraph.
The browser then turns the HTML structure into the webpage you see.
4️⃣ HTML Elements
An HTML element commonly consists of:
For example:
Here:
•
• Hello → Content
•
Together, they form an HTML element.
Another example:
The entire thing is an HTML element.
5️⃣ HTML Tags
A tag is the markup used to define an element.
Examples:
•
•
•
•
•
Different tags represent different types of content.
For example:
h1 represents a heading.
p represents a paragraph.
button represents a button.
6️⃣ A Simple HTML Page
A basic HTML document looks like this:
Don't worry if you don't understand everything yet.
We'll learn each part separately.
For now, understand the overall structure.
7️⃣
The
Most of your HTML page exists inside it.
Think of it as the outer container of the document.
8️⃣
The
For example:
🏗️ HTML — What Is HTML and Why Do We Need It?
HTML is the first major technology we'll learn for building websites.
1️⃣ What Is HTML?
HTML stands for:
HyperText Markup Language
HTML is the standard markup language used to structure content on webpages.
In simple words:
HTML tells the browser what content exists on a webpage and what each piece of content represents.
For example, a webpage might contain:
• A heading
• Paragraphs
• Images
• Links
• Buttons
• Lists
• Forms
• Tables
HTML provides the structure for these elements.
2️⃣ HTML Is Not a Programming Language
This is an important distinction.
HTML is a markup language, not a programming language.
HTML describes the structure and meaning of content.
For example:
<h1>My Portfolio</h1>
<p>Welcome to my website.</p>
There is no programming logic here.
We're simply telling the browser:
"This is a main heading."
and:
"This is a paragraph."
JavaScript, on the other hand, can perform programming logic:
let age = 25;
if (age >= 18) {
console.log("Adult");
}
So remember:
• HTML → Structure
• CSS → Appearance
• JavaScript → Behaviour and logic
3️⃣ How HTML Works
HTML uses elements to describe content.
For example:
<h1>Hello World</h1>
The browser interprets this as a heading.
Another example:
<p>Welcome to my website.</p>
The browser interprets this as a paragraph.
The browser then turns the HTML structure into the webpage you see.
4️⃣ HTML Elements
An HTML element commonly consists of:
<tag>Content</tag>
For example:
<p>Hello</p>
Here:
•
<p> → Opening tag• Hello → Content
•
</p> → Closing tagTogether, they form an HTML element.
Another example:
<h1>Web Development</h1>
The entire thing is an HTML element.
5️⃣ HTML Tags
A tag is the markup used to define an element.
Examples:
•
<h1>•
<p>•
<a>•
<img>•
<button>Different tags represent different types of content.
For example:
<h1>My Website</h1>h1 represents a heading.
<p>Hello everyone.</p>p represents a paragraph.
<button>Login</button>button represents a button.
6️⃣ A Simple HTML Page
A basic HTML document looks like this:
<!DOCTYPE html>
<html>
<head>
<title>My Website</title>
</head>
<body>
<h1>Welcome to My Website</h1>
<p>This is my first webpage.</p>
</body>
</html>
Don't worry if you don't understand everything yet.
We'll learn each part separately.
For now, understand the overall structure.
7️⃣
<html>The
<html> element represents the root of the HTML document.Most of your HTML page exists inside it.
<html>
...
</html>
Think of it as the outer container of the document.
8️⃣
<head>The
<head> contains information about the webpage that generally isn't displayed as the main page content.For example:
<head>
<title>My Website</title>
</head>
❤5
It can contain things such as:
• Page title
• Metadata
• Links to CSS
• Other information used by the browser
We'll explore the
9️⃣
The
For example:
The user can see this content in the browser.
A simple way to remember:
🔟
You'll usually see this at the beginning of an HTML document:
It tells the browser that the document uses modern HTML standards.
It's a doctype declaration, not an ordinary HTML element.
🌐 Real-World Example
Imagine you're building a portfolio.
You might start with:
HTML provides the structure:
Later, CSS will make this structure visually appealing.
JavaScript can then add interactive behaviour.
🧩 HTML + CSS + JavaScript
Think about a car:
HTML → The structure
Provides the basic parts:
• Body
• Seats
• Wheels
• Dashboard
CSS → The appearance
Controls:
• Colors
• Size
• Design
• Layout
JavaScript → Behaviour
Controls things such as:
• Interactive controls
• Dynamic behaviour
• Responses to user actions
Together, they form the foundation of frontend web development.
🧠 Key Points to Remember
• HTML = HyperText Markup Language
• HTML structures webpage content.
• HTML is a markup language, not a programming language.
• HTML uses elements and tags.
•
•
•
• HTML provides structure, CSS provides styling, and JavaScript provides behaviour.
Double Tap ❤️ For More
• Page title
• Metadata
• Links to CSS
• Other information used by the browser
We'll explore the
<head> in detail later.9️⃣
<body>The
<body> contains the main content displayed on the webpage.For example:
<body>
<h1>Welcome</h1>
<p>This is my website.</p>
</body>
The user can see this content in the browser.
A simple way to remember:
<html>
│
├── <head>
│ → Information about the page
│
└── <body>
→ Visible page content
🔟
<!DOCTYPE html>You'll usually see this at the beginning of an HTML document:
<!DOCTYPE html>
It tells the browser that the document uses modern HTML standards.
It's a doctype declaration, not an ordinary HTML element.
🌐 Real-World Example
Imagine you're building a portfolio.
You might start with:
<h1>Deepak's Portfolio</h1>
<p>
Welcome to my portfolio website.
</p>
<h2>My Projects</h2>
<p>
Here are some of the projects I have built.
</p>
HTML provides the structure:
Portfolio
↓
Introduction
↓
Projects
↓
Project information
Later, CSS will make this structure visually appealing.
JavaScript can then add interactive behaviour.
🧩 HTML + CSS + JavaScript
Think about a car:
HTML → The structure
Provides the basic parts:
• Body
• Seats
• Wheels
• Dashboard
CSS → The appearance
Controls:
• Colors
• Size
• Design
• Layout
JavaScript → Behaviour
Controls things such as:
• Interactive controls
• Dynamic behaviour
• Responses to user actions
Together, they form the foundation of frontend web development.
🧠 Key Points to Remember
• HTML = HyperText Markup Language
• HTML structures webpage content.
• HTML is a markup language, not a programming language.
• HTML uses elements and tags.
•
<head> contains information about the document.•
<body> contains the main visible webpage content.•
<!DOCTYPE html> declares the document type.• HTML provides structure, CSS provides styling, and JavaScript provides behaviour.
Double Tap ❤️ For More
❤21
🌐 Web Development Roadmap — Part 13
HTML Syntax, Tags & Elements
Now that you understand what HTML is, let's learn how HTML actually works.
1. What is an HTML Tag?
A tag tells the browser what type of content something is.
Example:
Here:
Hello World → content
The complete structure is called an HTML element.
2. HTML Element
An HTML element usually looks like this:
For example:
Think of an element as a complete building block of a webpage.
3. Opening and Closing Tags
Most HTML elements have both.
Opening:
Closing:
Notice the
4. Some Tags Don't Need a Closing Tag
Some HTML elements are void elements.
Example:
They don't have a separate closing tag.
5. HTML Attributes
Attributes provide additional information about an element.
Example:
Here:
Another example:
The image has two attributes:
src → location of the image
alt → description of the image
6. Attributes Usually Go Inside the Opening Tag
Correct:
Incorrect:
7. Nesting Elements
HTML elements can be placed inside other elements.
Example:
Here:
The
8. Proper Nesting Matters
Correct:
Incorrect:
HTML elements should be properly nested.
9. HTML Comments
Comments allow developers to leave notes in their code.
The browser doesn't display the comment as webpage content.
Example:
10. A Simple HTML Example
HTML Syntax, Tags & Elements
Now that you understand what HTML is, let's learn how HTML actually works.
1. What is an HTML Tag?
A tag tells the browser what type of content something is.
Example:
<h1>Hello World</h1>
Here:
<h1> → opening tagHello World → content
</h1> → closing tag The complete structure is called an HTML element.
2. HTML Element
An HTML element usually looks like this:
<tag>Content</tag>
For example:
<p>This is a paragraph.</p>
<h2>About Me</h2>
<button>Click Me</button>
Think of an element as a complete building block of a webpage.
3. Opening and Closing Tags
Most HTML elements have both.
<p>Hello</p>
Opening:
<p>Closing:
</p>Notice the
/ in the closing tag.4. Some Tags Don't Need a Closing Tag
Some HTML elements are void elements.
Example:
<img src="photo.jpg" alt="My photo">
<br>
<hr>
They don't have a separate closing tag.
5. HTML Attributes
Attributes provide additional information about an element.
Example:
<a href="https://example.com">Visit Website</a>
Here:
href="https://example.com" is an attribute.Another example:
<img src="profile.jpg" alt="Profile photo">
The image has two attributes:
src → location of the image
alt → description of the image
6. Attributes Usually Go Inside the Opening Tag
Correct:
<p class="description">Hello</p>
Incorrect:
<p>Hello</p class="description">
7. Nesting Elements
HTML elements can be placed inside other elements.
Example:
<div>
<h1>My Website</h1>
<p>Welcome to my website.</p>
</div>
Here:
<div>
├── <h1>
└── <p>
The
<h1> and <p> elements are inside the <div>.8. Proper Nesting Matters
Correct:
<p>
Hello <strong>World</strong>
</p>
Incorrect:
<p>
Hello <strong>World</p></strong>
HTML elements should be properly nested.
9. HTML Comments
Comments allow developers to leave notes in their code.
<!-- This is a comment -->
The browser doesn't display the comment as webpage content.
Example:
<!-- Website heading -->
<h1>My Portfolio</h1>
10. A Simple HTML Example
<!DOCTYPE html>
<html>
<head>
<title>My Portfolio</title>
</head>
<body>
<h1>Welcome to My Portfolio</h1>
<p>I am learning web development.</p>
<a href="about.html">About Me</a>
</body>
</html>
❤4
The browser reads the HTML structure and builds the webpage from these elements.
Key Takeaway
HTML is essentially the structure of your webpage.
Once you understand tags, elements, attributes, and nesting, you'll be able to start building real webpage structures.
Double Tap ❤️ For More
Key Takeaway
HTML is essentially the structure of your webpage.
<h1> → Heading<p> → Paragraph<a> → Link<img> → Image<button> → Button Once you understand tags, elements, attributes, and nesting, you'll be able to start building real webpage structures.
Double Tap ❤️ For More
❤14