🌐 Web Development Roadmap — Part 16
HTML Links — Tag
Links are one of the most important parts of the web. They allow users to move from one page or website to another.
1. Creating a Link
HTML uses the
The browser displays:
Visit Google
When the user clicks it, the browser navigates to the specified URL.
2. The href Attribute
href stands for Hypertext Reference.
Here:
href → Specifies where the link goes
URL → Destination
Text → What the user clicks
3. Linking to Another Page
Suppose your project contains:
From
These are called relative links because they point to files within your website.
4. Linking to Another Website
You can also link to an external website:
The complete URL is used for an external destination.
5. Opening a Link in a New Tab
You can use
This tells the browser to open the destination in a new browsing context, commonly a new tab.
For external links, it's also good practice to use:
6. Email Links
You can create a link that opens the user's email application:
7. Telephone Links
You can create a clickable phone link:
This is especially useful on mobile websites.
8. Linking to a Section on the Same Page
You can jump to a specific section using an id.
The flow is:
Click "Go to Contact"
↓
Find id="contact"
↓
Jump to that section
9. Navigation Menu Example
A simple website navigation could look like:
This creates the foundation of a website's navigation.
10. Link vs Button
This is important.
Use a link when the user is going somewhere:
Use a button when the user is performing an action:
HTML Links — Tag
Links are one of the most important parts of the web. They allow users to move from one page or website to another.
1. Creating a Link
HTML uses the
<a> (anchor) element to create links.<a href="https://www.google.com">Visit Google</a>
The browser displays:
Visit Google
When the user clicks it, the browser navigates to the specified URL.
2. The href Attribute
href stands for Hypertext Reference.
<a href="https://example.com">Visit Website</a>
Here:
<a> → Creates the linkhref → Specifies where the link goes
URL → Destination
Text → What the user clicks
3. Linking to Another Page
Suppose your project contains:
my-website/
├── index.html
├── about.html
└── contact.html
From
index.html:<a href="about.html">About Me</a>
<a href="contact.html">Contact</a>
These are called relative links because they point to files within your website.
4. Linking to Another Website
You can also link to an external website:
<a href="https://www.example.com">
Visit Example
</a>
The complete URL is used for an external destination.
5. Opening a Link in a New Tab
You can use
target="_blank":<a href="https://www.example.com" target="_blank">
Visit Website
</a>
This tells the browser to open the destination in a new browsing context, commonly a new tab.
For external links, it's also good practice to use:
<a
href="https://www.example.com"
target="_blank"
rel="noopener noreferrer">
Visit Website
</a>
6. Email Links
You can create a link that opens the user's email application:
<a href="mailto:hello@example.com">
Send Email
</a>
7. Telephone Links
You can create a clickable phone link:
<a href="tel:+911234567890">
Call Us
</a>
This is especially useful on mobile websites.
8. Linking to a Section on the Same Page
You can jump to a specific section using an id.
<a href="#contact">Go to Contact</a>
<h2 id="contact">Contact Me</h2>
The flow is:
Click "Go to Contact"
↓
Find id="contact"
↓
Jump to that section
9. Navigation Menu Example
A simple website navigation could look like:
<nav>
<a href="index.html">Home</a>
<a href="about.html">About</a>
<a href="projects.html">Projects</a>
<a href="contact.html">Contact</a>
</nav>
This creates the foundation of a website's navigation.
10. Link vs Button
This is important.
Use a link when the user is going somewhere:
<a href="about.html">About Me</a>
Use a button when the user is performing an action:
<button>Submit</button>
❤5👍1
For example:
Go to Profile →
Submit Form →
Open Article →
Delete Account →
🧠 Remember
↓
Creates a link
href
↓
Specifies destination
↓
Opens in a new browsing context
id
↓
Can create a destination within the same page
Key Takeaway
The
Page A
↓
↓
Page B
Without links, navigating between webpages would be much harder.
Double Tap ❤️ For More
Go to Profile →
<a>Submit Form →
<button>Open Article →
<a>Delete Account →
<button> 🧠 Remember
<a>↓
Creates a link
href
↓
Specifies destination
target="_blank"↓
Opens in a new browsing context
id
↓
Can create a destination within the same page
Key Takeaway
The
<a> element connects the web together.Page A
↓
<a href="page-b.html">↓
Page B
Without links, navigating between webpages would be much harder.
Double Tap ❤️ For More
❤8
🌐 Web Development Roadmap — Part 17
HTML Images —
Images make webpages more visual and engaging. HTML provides the
1. Adding an Image
Unlike elements such as
2. The
It tells the browser where the image is located.
The browser follows the path:
3. The
It is important for accessibility and can also be displayed if the image cannot be loaded.
A good alt describes the actual image:
Avoid unnecessary descriptions such as:
4. Images Inside Folders
Suppose your project looks like:
You can write:
5. Image Dimensions
You can specify dimensions using
However, modern websites commonly use CSS to control presentation and responsive sizing.
6. Absolute vs Relative Image Paths
Relative path:
This refers to a file within your project.
An external image can use a full URL:
For real projects, images are often hosted as part of your application or through an image/CDN service.
7. Images as Links
You can place an image inside an anchor element:
Now clicking the image follows the link.
8. Decorative Images
Not every image provides meaningful information.
For a purely decorative image, an empty
This tells assistive technologies that the image can be ignored.
9. Common Image Formats
You will commonly encounter:
JPEG / JPG → Photos
PNG → Transparency and graphics
SVG → Logos and scalable graphics
WebP → Modern web images
AVIF → Modern, highly compressed images
GIF → Simple animations
The appropriate format depends on the type of image and performance requirements.
10. Complete Example
🧠 Remember
Key Takeaway
The basic image structure is:
The two most important attributes to remember are:
Double Tap ❤️ For Part-18
HTML Images —
<img> TagImages make webpages more visual and engaging. HTML provides the
<img> element to display images.1. Adding an Image
<img src="photo.jpg" alt="A beautiful landscape">
Unlike elements such as
<p>, <img> does not need a closing tag.2. The
src Attributesrc stands for source.It tells the browser where the image is located.
<img src="images/profile.jpg" alt="Profile photo">
The browser follows the path:
HTML
↓
src="images/profile.jpg"
↓
images folder
↓
http://profile.jpg
↓
Display image
3. The
alt Attributealt provides alternative text describing the image.<img src="profile.jpg" alt="Profile photo">
It is important for accessibility and can also be displayed if the image cannot be loaded.
A good alt describes the actual image:
<img src="dog.jpg" alt="Golden retriever sitting in a park">
Avoid unnecessary descriptions such as:
alt="image"
4. Images Inside Folders
Suppose your project looks like:
my-website/
├── http://index.html
├── http://style.css
└── images/
├── http://logo.png
└── http://profile.jpg
You can write:
<img src="images/logo.png" alt="Company logo">
5. Image Dimensions
You can specify dimensions using
width and height attributes:<img
src="profile.jpg"
alt="Profile photo"
width="300"
height="300">
However, modern websites commonly use CSS to control presentation and responsive sizing.
6. Absolute vs Relative Image Paths
Relative path:
<img src="images/photo.jpg" alt="Photo">
This refers to a file within your project.
An external image can use a full URL:
<img
src="https://example.com/photo.jpg"
alt="Example photo">
For real projects, images are often hosted as part of your application or through an image/CDN service.
7. Images as Links
You can place an image inside an anchor element:
<a href="https://example.com">
<img src="logo.png" alt="Example website">
</a>
Now clicking the image follows the link.
8. Decorative Images
Not every image provides meaningful information.
For a purely decorative image, an empty
alt is appropriate:<img src="decorative-line.png" alt="">
This tells assistive technologies that the image can be ignored.
9. Common Image Formats
You will commonly encounter:
JPEG / JPG → Photos
PNG → Transparency and graphics
SVG → Logos and scalable graphics
WebP → Modern web images
AVIF → Modern, highly compressed images
GIF → Simple animations
The appropriate format depends on the type of image and performance requirements.
10. Complete Example
<!DOCTYPE html>
<html>
<head>
<title>My Portfolio</title>
</head>
<body>
<h1>My Portfolio</h1>
<img
src="images/profile.jpg"
alt="Profile photo"
width="300"
height="300">
<h2>My Projects</h2>
<img
src="images/project.png"
alt="Screenshot of my web development project">
</body>
</html>
🧠 Remember
<img>
↓
Displays an image
src
↓
Where the image comes from
alt
↓
Alternative description
width / height
↓
Image dimensions
Key Takeaway
The basic image structure is:
<img src="image.jpg" alt="Description of image">
The two most important attributes to remember are:
src → image location alt → meaningful alternative textDouble Tap ❤️ For Part-18
❤22
🌐 Web Development Roadmap — Part 18
HTML Lists
Lists are used whenever information needs to be presented as a group of related items.
1. Unordered List
An unordered list displays items with bullets.
It produces:
• HTML
• CSS
• JavaScript
2. List Item
Each item inside a list uses
Think of it as:
↓
3. Ordered List
An ordered list displays items in a sequence, usually using numbers.
It produces:
1. Learn HTML
2. Learn CSS
3. Learn JavaScript
4. When to Use Which?
Use
Use
5. Nested Lists
A list can contain another list.
The structure becomes:
• Frontend
• HTML
• CSS
•
JavaScript
•
Backend
• Node.js
• Express
6. Lists in Navigation
Lists are commonly used to structure navigation menus.
CSS can later transform this into a horizontal navigation bar.
7. Lists in Real Websites
Lists are useful for many things:
• Shopping items
• Features
• Navigation menus
• Steps
• Skills
• Categories
• Search results
• Product specifications
For example:
8. Important Rule
Good:
Not appropriate:
🧠 Remember
Key Takeaway
and
Lists are simple, but they are fundamental to creating well-structured HTML content.
Double Tap ❤️ For More
HTML Lists
Lists are used whenever information needs to be presented as a group of related items.
1. Unordered List
An unordered list displays items with bullets.
<ul>
<li>HTML</li>
<li>CSS</li>
<li>JavaScript</li>
</ul>
It produces:
• HTML
• CSS
• JavaScript
<ul> means unordered list.2. List Item
Each item inside a list uses
<li>.<li>HTML</li>Think of it as:
<ul> → List container↓
<li> → Individual item 3. Ordered List
An ordered list displays items in a sequence, usually using numbers.
<ol>
<li>Learn HTML</li>
<li>Learn CSS</li>
<li>Learn JavaScript</li>
</ol>
It produces:
1. Learn HTML
2. Learn CSS
3. Learn JavaScript
<ol> means ordered list.4. When to Use Which?
Use
<ul> when order doesn't matter:<ul>
<li>Apples</li>
<li>Bananas</li>
<li>Oranges</li>
</ul>
Use
<ol> when order or sequence matters:<ol>
<li>Create an account</li>
<li>Verify your email</li>
<li>Log in</li>
</ol>
5. Nested Lists
A list can contain another list.
<ul>
<li>
Frontend
<ul>
<li>HTML</li>
<li>CSS</li>
<li>JavaScript</li>
</ul>
</li>
<li>
Backend
<ul>
<li>Node.js</li>
<li>Express</li>
</ul>
</li>
</ul>
The structure becomes:
• Frontend
• HTML
• CSS
•
JavaScript
•
Backend
• Node.js
• Express
6. Lists in Navigation
Lists are commonly used to structure navigation menus.
<nav>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="about.html">About</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</nav>
CSS can later transform this into a horizontal navigation bar.
7. Lists in Real Websites
Lists are useful for many things:
• Shopping items
• Features
• Navigation menus
• Steps
• Skills
• Categories
• Search results
• Product specifications
For example:
<h2>My Skills</h2>
<ul>
<li>HTML</li>
<li>CSS</li>
<li>JavaScript</li>
<li>React</li>
</ul>
8. Important Rule
<li> should normally be used as a child of a list such as <ul> or <ol>.Good:
<ul>
<li>HTML</li>
<li>CSS</li>
</ul>
Not appropriate:
<li>HTML</li>
<li>CSS</li>
🧠 Remember
<ul> → Unordered list → Bullets<ol> → Ordered list → Numbers/sequence<li> → List item → Individual item Key Takeaway
<ul>
↓
Unordered group
↓
<li> Item
<li> Item
<li> Item
and
<ol>
↓
Ordered group
↓
<li> Step 1
<li> Step 2
<li> Step 3
Lists are simple, but they are fundamental to creating well-structured HTML content.
Double Tap ❤️ For More
❤18👍1
🌐 Web Development Roadmap — Part 19
HTML Tables
Tables are used to display information in rows and columns.
For example, a website might use a table to display:
• Employee information
• Product details
• Exam results
• Prices
• Sales data
• Schedules
1. Basic Table Structure
A simple HTML table looks like this:
The structure is:
2.
The
Everything belonging to the table goes inside it.
3.
Each
4.
Browsers typically display header cells in bold.
5.
6. Understanding the Structure
Consider:
7.
For larger or more structured tables, HTML provides sections.
The structure becomes:
8. colspan
Here the cell occupies two columns.
9. rowspan
HTML Tables
Tables are used to display information in rows and columns.
For example, a website might use a table to display:
• Employee information
• Product details
• Exam results
• Prices
• Sales data
• Schedules
1. Basic Table Structure
A simple HTML table looks like this:
<table>
<tr>
<th>Name</th>
<th>Role</th>
</tr>
<tr>
<td>Rahul</td>
<td>Developer</td>
</tr>
<tr>
<td>Priya</td>
<td>Designer</td>
</tr>
</table>
The structure is:
<table>
↓
<tr> → Table Row
↓
<th> → Header Cell
<td> → Data Cell
2.
<table>The
<table> element defines the entire table.<table>
...
</table>
Everything belonging to the table goes inside it.
3.
<tr> — Table Row<tr> creates a row.<tr>
<td>Rahul</td>
<td>Developer</td>
</tr>
Each
<tr> represents one horizontal row.4.
<th> — Table Header<th> represents a header cell.<tr>
<th>Name</th>
<th>Age</th>
<th>City</th>
</tr>
Browsers typically display header cells in bold.
5.
<td> — Table Data<td> represents normal data.<tr>
<td>Rahul</td>
<td>25</td>
<td>Pune</td>
</tr>
6. Understanding the Structure
Consider:
<table>
<tr>
<th>Name</th>
<th>Department</th>
</tr>
<tr>
<td>Amit</td>
<td>Finance</td>
</tr>
</table>
7.
<thead>, <tbody> and <tfoot>For larger or more structured tables, HTML provides sections.
<table>
<thead>
<tr>
<th>Product</th>
<th>Price</th>
</tr>
</thead>
<tbody>
<tr>
<td>Laptop</td>
<td>₹60,000</td>
</tr>
<tr>
<td>Phone</td>
<td>₹30,000</td>
</tr>
</tbody>
<tfoot>
<tr>
<td>Total</td>
<td>₹90,000</td>
</tr>
</tfoot>
</table>
The structure becomes:
<table>
├── <thead>
│ └── Header rows
│
├── <tbody>
│ └── Main data rows
│
└── <tfoot>
└── Summary/footer rows
8. colspan
colspan allows a cell to span multiple columns.<tr>
<td colspan="2">Total Sales</td>
</tr>
Here the cell occupies two columns.
9. rowspan
rowspan allows a cell to span multiple rows.<tr>
<td rowspan="2">Finance</td>
<td>Rahul</td>
</tr>
<tr>
<td>Priya</td>
</tr>
❤4👍1
The Finance cell spans two rows.
10. Tables vs Layout
Tables should be used for tabular data.
Good use:
Employee | Department | Salary
Not recommended:
Using tables to position
a website's navigation,
images and buttons.
Modern layouts should use CSS Flexbox and Grid instead.
🧠 Remember
Key Takeaway
A semantic table usually follows this structure:
HTML tables are primarily about representing relationships between rows and columns. CSS will later control how the table looks.
Double Tap ❤️ For More
10. Tables vs Layout
Tables should be used for tabular data.
Good use:
Employee | Department | Salary
Not recommended:
Using tables to position
a website's navigation,
images and buttons.
Modern layouts should use CSS Flexbox and Grid instead.
🧠 Remember
<table> → Entire table<tr> → Table row<th> → Header cell<td> → Data cell<thead> → Header section<tbody> → Main data section<tfoot> → Footer/summary section Key Takeaway
A semantic table usually follows this structure:
<table>
↓
<thead> → column headings
↓
<tbody> → actual data
↓
<tfoot> → totals/summary
HTML tables are primarily about representing relationships between rows and columns. CSS will later control how the table looks.
Double Tap ❤️ For More
❤9👍1🔥1
Steps to become a full-stack developer
Learn the Fundamentals: Start with the basics of programming languages, web development, and databases. Familiarize yourself with technologies like HTML, CSS, JavaScript, and SQL.
Front-End Development: Master front-end technologies like HTML, CSS, and JavaScript. Learn about frameworks like React, Angular, or Vue.js for building user interfaces.
Back-End Development: Gain expertise in a back-end programming language like Python, Java, Ruby, or Node.js. Learn how to work with servers, databases, and server-side frameworks like Express.js or Django.
Databases: Understand different types of databases, both SQL (e.g., MySQL, PostgreSQL) and NoSQL (e.g., MongoDB). Learn how to design and query databases effectively.
Version Control: Learn Git, a version control system, to track and manage code changes collaboratively.
APIs and Web Services: Understand how to create and consume APIs and web services, as they are essential for full-stack development.
Development Tools: Familiarize yourself with development tools, including text editors or IDEs, debugging tools, and build automation tools.
Server Management: Learn how to deploy and manage web applications on web servers or cloud platforms like AWS, Azure, or Heroku.
Security: Gain knowledge of web security principles to protect your applications from common vulnerabilities.
Build a Portfolio: Create a portfolio showcasing your projects and skills. It's a powerful way to demonstrate your abilities to potential employers.
Project Experience: Work on real projects to apply your skills. Building personal projects or contributing to open-source projects can be valuable.
Continuous Learning: Stay updated with the latest web development trends and technologies. The tech industry evolves rapidly, so continuous learning is crucial.
Soft Skills: Develop good communication, problem-solving, and teamwork skills, as they are essential for working in development teams.
Job Search: Start looking for full-stack developer job opportunities. Tailor your resume and cover letter to highlight your skills and experience.
Interview Preparation: Prepare for technical interviews, which may include coding challenges, algorithm questions, and discussions about your projects.
Continuous Improvement: Even after landing a job, keep learning and improving your skills. The tech industry is always changing.
Remember that becoming a full-stack developer takes time and dedication. It's a journey of continuous learning and improvement, so stay persistent and keep building your skills.
ENJOY LEARNING 👍👍
Learn the Fundamentals: Start with the basics of programming languages, web development, and databases. Familiarize yourself with technologies like HTML, CSS, JavaScript, and SQL.
Front-End Development: Master front-end technologies like HTML, CSS, and JavaScript. Learn about frameworks like React, Angular, or Vue.js for building user interfaces.
Back-End Development: Gain expertise in a back-end programming language like Python, Java, Ruby, or Node.js. Learn how to work with servers, databases, and server-side frameworks like Express.js or Django.
Databases: Understand different types of databases, both SQL (e.g., MySQL, PostgreSQL) and NoSQL (e.g., MongoDB). Learn how to design and query databases effectively.
Version Control: Learn Git, a version control system, to track and manage code changes collaboratively.
APIs and Web Services: Understand how to create and consume APIs and web services, as they are essential for full-stack development.
Development Tools: Familiarize yourself with development tools, including text editors or IDEs, debugging tools, and build automation tools.
Server Management: Learn how to deploy and manage web applications on web servers or cloud platforms like AWS, Azure, or Heroku.
Security: Gain knowledge of web security principles to protect your applications from common vulnerabilities.
Build a Portfolio: Create a portfolio showcasing your projects and skills. It's a powerful way to demonstrate your abilities to potential employers.
Project Experience: Work on real projects to apply your skills. Building personal projects or contributing to open-source projects can be valuable.
Continuous Learning: Stay updated with the latest web development trends and technologies. The tech industry evolves rapidly, so continuous learning is crucial.
Soft Skills: Develop good communication, problem-solving, and teamwork skills, as they are essential for working in development teams.
Job Search: Start looking for full-stack developer job opportunities. Tailor your resume and cover letter to highlight your skills and experience.
Interview Preparation: Prepare for technical interviews, which may include coding challenges, algorithm questions, and discussions about your projects.
Continuous Improvement: Even after landing a job, keep learning and improving your skills. The tech industry is always changing.
Remember that becoming a full-stack developer takes time and dedication. It's a journey of continuous learning and improvement, so stay persistent and keep building your skills.
ENJOY LEARNING 👍👍
❤17
Which HTML tag defines a table?
Anonymous Quiz
10%
A) <tab>
85%
B) <table>
4%
C) <grid>
1%
D) <data>
❤2
❤3
Which tag is used for a table header cell?
Anonymous Quiz
20%
A) <header>
23%
B) <thead>
53%
C) <th>
5%
D) <td>
👏2👍1
Which tag is used for a normal table data cell?
Anonymous Quiz
7%
A) <data>
17%
B) <cell>
70%
C) <td>
7%
D) <tr>
👏1😁1
What does colspan="2" do?
Anonymous Quiz
15%
A) Creates two rows
75%
B) Makes a cell span two columns
7%
C) Creates two tables
3%
D) Makes two cells bold
❤2👍1🤔1
🌐 Web Development Roadmap — Part 20
HTML Forms
Forms allow users to enter and submit information on a webpage.
You see forms everywhere:
• Login pages
• Registration pages
• Search boxes
• Contact forms
• Checkout pages
• Job applications
• Feedback forms
1. The
A form is created using
Example:
2.
The
label
↓
for="name"
↓
id="name"
↓
input
This also improves accessibility and makes the form easier to use.
3. Text Input
The most common input is a text field.
A better version:
4. Email Input
The email type allows browsers to provide appropriate input behavior and basic validation.
5. Password Input
The entered characters are normally hidden.
6. Number Input
This is useful when the expected value is numeric.
7. Submit Button
When placed inside a form, this submits the form by default.
You can also write:
However,
8. Required Fields
The
The browser can prevent submission when the required field is empty.
9. Placeholder
Important: a placeholder is not a replacement for a
10. Radio Buttons
Radio buttons allow the user to select one option from a group.
The same
11. Checkboxes
Checkboxes allow users to select multiple options.
Unlike radio buttons, multiple checkboxes can be selected.
12. Textarea
Use
HTML Forms
Forms allow users to enter and submit information on a webpage.
You see forms everywhere:
• Login pages
• Registration pages
• Search boxes
• Contact forms
• Checkout pages
• Job applications
• Feedback forms
1. The
<form> ElementA form is created using
<form>.<form>
...
</form>
Example:
<form>
<label>Name</label>
<input type="text">
<button>Submit</button>
</form>
2.
<label><label> describes what an input field is for.<label for="name">Name</label>
<input type="text" id="name">
The
for value should match the input's id.label
↓
for="name"
↓
id="name"
↓
input
This also improves accessibility and makes the form easier to use.
3. Text Input
The most common input is a text field.
<input type="text">
A better version:
<label for="name">Full Name</label>
<input type="text" id="name" name="name">
4. Email Input
<label for="email">Email</label>
<input type="email" id="email" name="email">
The email type allows browsers to provide appropriate input behavior and basic validation.
5. Password Input
<label for="password">Password</label>
<input type="password" id="password" name="password">
The entered characters are normally hidden.
6. Number Input
<label for="age">Age</label>
<input type="number" id="age" name="age">
This is useful when the expected value is numeric.
7. Submit Button
<button type="submit">Submit</button>
When placed inside a form, this submits the form by default.
You can also write:
<input type="submit" value="Submit">
However,
<button> is generally more flexible.8. Required Fields
The
required attribute tells the browser that a value must be provided.<input
type="email"
id="email"
name="email"
required>
The browser can prevent submission when the required field is empty.
9. Placeholder
placeholder provides a hint inside an input.<input
type="text"
placeholder="Enter your name">
Important: a placeholder is not a replacement for a
<label>.10. Radio Buttons
Radio buttons allow the user to select one option from a group.
<p>Gender</p>
<label>
<input type="radio" name="gender" value="male">
Male
</label>
<label>
<input type="radio" name="gender" value="female">
Female
</label>
The same
name groups the radio buttons together.11. Checkboxes
Checkboxes allow users to select multiple options.
<label>
<input type="checkbox" name="skills" value="html">
HTML
</label>
<label>
<input type="checkbox" name="skills" value="css">
CSS
</label>
Unlike radio buttons, multiple checkboxes can be selected.
12. Textarea
Use
<textarea> for longer text.<label for="message">Message</label>
<textarea
id="message"
name="message"
rows="5"
cols="30">
</textarea>
❤8🔥1
Common use cases include:
• Comments
• Feedback
• Messages
• Descriptions
13. Select Dropdown
A dropdown can be created using
14. Complete Form Example
15. How a Form Works
A typical form flow is:
User enters information
↓
HTML form
↓
Submit
↓
Browser sends data
↓
Backend receives data
↓
Backend processes it
↓
Database may store it
↓
Response sent back
HTML creates the form, but HTML alone doesn't create a complete registration or login system. JavaScript and backend technologies will later handle more advanced behavior and data processing.
🧠 Remember
Understanding forms is essential because almost every real-world web application needs to collect information from users.
Double Tap ❤️ For More
• Comments
• Feedback
• Messages
• Descriptions
13. Select Dropdown
A dropdown can be created using
<select> and <option>.<label for="city">City</label>
<select id="city" name="city">
<option value="pune">Pune</option>
<option value="mumbai">Mumbai</option>
<option value="delhi">Delhi</option>
</select>
14. Complete Form Example
<form>
<label for="name">Full Name</label>
<input
type="text"
id="name"
name="name"
required>
<label for="email">Email</label>
<input
type="email"
id="email"
name="email"
required>
<label for="password">Password</label>
<input
type="password"
id="password"
name="password"
required>
<label for="city">City</label>
<select id="city" name="city">
<option value="pune">Pune</option>
<option value="mumbai">Mumbai</option>
</select>
<label for="message">Message</label>
<textarea
id="message"
name="message">
</textarea>
<button type="submit">Register</button>
</form>
15. How a Form Works
A typical form flow is:
User enters information
↓
HTML form
↓
Submit
↓
Browser sends data
↓
Backend receives data
↓
Backend processes it
↓
Database may store it
↓
Response sent back
HTML creates the form, but HTML alone doesn't create a complete registration or login system. JavaScript and backend technologies will later handle more advanced behavior and data processing.
🧠 Remember
<form> → Form container<label> → Describes an input<input> → Single-line input<textarea> → Multi-line input<select> → Dropdown<option> → Dropdown option<button> → Buttonrequired → Makes a value required Understanding forms is essential because almost every real-world web application needs to collect information from users.
Double Tap ❤️ For More
❤15
𝗠𝗔𝗦𝗧𝗘𝗥 𝗦𝗤𝗟 𝗙𝗢𝗥 𝗙𝗥𝗘𝗘 𝗜𝗡 𝟮𝟬𝟮𝟲 📊
🔥 Essential Skill for Data Analytics
🔥 Useful for Data Science & Backend Development
🔥 Practice Real-World Database Queries
🔥 Strengthen Your Technical Interview Skills
🎯 Perfect For:- Students | Freshers | Job Seekers | Working Professionals
🔗 𝗘𝘅𝗽𝗹𝗼𝗿𝗲 𝗔𝗟𝗟 𝟱 𝗙𝗥𝗘𝗘 𝗦𝗤𝗟 𝗪𝗲𝗯𝘀𝗶𝘁𝗲𝘀 👇:-
https://pdlink.in/4yOlWlh
📌 SAVE this post & SHARE it with friends preparing for tech careers!
🔥 Essential Skill for Data Analytics
🔥 Useful for Data Science & Backend Development
🔥 Practice Real-World Database Queries
🔥 Strengthen Your Technical Interview Skills
🎯 Perfect For:- Students | Freshers | Job Seekers | Working Professionals
🔗 𝗘𝘅𝗽𝗹𝗼𝗿𝗲 𝗔𝗟𝗟 𝟱 𝗙𝗥𝗘𝗘 𝗦𝗤𝗟 𝗪𝗲𝗯𝘀𝗶𝘁𝗲𝘀 👇:-
https://pdlink.in/4yOlWlh
📌 SAVE this post & SHARE it with friends preparing for tech careers!
❤2
🌐 Web Development Roadmap — Part 21
HTML Input Types & Form Attributes
In the previous lesson, you learned how to create forms. Now let's understand the different types of inputs and the attributes that make forms more useful.
1. Text Input
Used for short text such as:
• Name
• Username
• City
• Job title
2. Email Input
Used for email addresses.
The browser can perform basic validation when the form is submitted.
3. Password Input
Characters are normally hidden while the user types.
Commonly used for:
• Passwords
• PIN-like fields
• Secret values
4. Number Input
Useful when the expected value is numeric.
You can also specify limits:
5. Date Input
Modern browsers can provide a date-selection interface.
6. File Input
Allows the user to select a file from their device.
For example:
7. Checkbox
Used when the user can select or deselect an option.
Example:
8. Radio Button
Radio buttons are useful when the user should choose one option from a group.
The same name groups the options.
9. Search Input
Designed specifically for search fields.
Example:
10. URL Input
Used when the user needs to enter a website URL.
11. name Attribute
The name attribute identifies the field when form data is submitted.
Think of it as the field's data key:
name = username
value = Rahul
The backend can receive something conceptually like:
username → Rahul
12. value Attribute
value specifies a value for an input.
The input starts with India as its value.
For radio buttons and checkboxes, value identifies what was selected.
13. placeholder
HTML Input Types & Form Attributes
In the previous lesson, you learned how to create forms. Now let's understand the different types of inputs and the attributes that make forms more useful.
1. Text Input
<input type="text" name="username">
Used for short text such as:
• Name
• Username
• City
• Job title
2. Email Input
<input type="email" name="email">
Used for email addresses.
<label for="email">Email</label>
<input type="email" id="email" name="email" required>
The browser can perform basic validation when the form is submitted.
3. Password Input
<input type="password" name="password">
Characters are normally hidden while the user types.
Commonly used for:
• Passwords
• PIN-like fields
• Secret values
4. Number Input
<input type="number" name="age">
Useful when the expected value is numeric.
You can also specify limits:
<input
type="number"
name="age"
min="18"
max="100">
5. Date Input
<input type="date" name="birthdate">
Modern browsers can provide a date-selection interface.
6. File Input
<input type="file" name="resume">
Allows the user to select a file from their device.
For example:
<label for="resume">Upload Resume</label>
<input type="file" id="resume" name="resume">
7. Checkbox
<input type="checkbox" name="terms">
Used when the user can select or deselect an option.
Example:
<label>
<input type="checkbox" name="terms" required>
I agree to the terms and conditions
</label>
8. Radio Button
Radio buttons are useful when the user should choose one option from a group.
<label>
<input type="radio" name="experience" value="beginner">
Beginner
</label>
<label>
<input type="radio" name="experience" value="advanced">
Advanced
</label>
The same name groups the options.
9. Search Input
<input type="search" name="query">
Designed specifically for search fields.
Example:
<label for="search">Search</label>
<input type="search" id="search" name="query">
10. URL Input
<input type="url" name="website">
Used when the user needs to enter a website URL.
<input
type="url"
name="portfolio"
placeholder="https://example.com">
11. name Attribute
The name attribute identifies the field when form data is submitted.
<input type="text" name="username">
Think of it as the field's data key:
name = username
value = Rahul
The backend can receive something conceptually like:
username → Rahul
12. value Attribute
value specifies a value for an input.
<input
type="text"
name="country"
value="India">
The input starts with India as its value.
For radio buttons and checkboxes, value identifies what was selected.
<input
type="radio"
name="plan"
value="premium">
13. placeholder
<input
type="text"
placeholder="Enter your name">
❤6
It provides a temporary hint.
Remember:
label → Identifies the field
placeholder → Gives an example/hint
A placeholder should not normally replace a proper label.
14. readonly
The user can generally view the value but cannot edit it through the input.
15. disabled
A disabled control cannot normally be interacted with or submitted as a successful form control.
16. maxlength
Limits the number of characters.
17. minlength
Specifies a minimum number of characters.
18. autocomplete
Helps the browser provide previously stored information.
This can make forms faster and easier to use.
19. Form Attributes
The
For example:
action specifies where the form data should be sent.
method specifies how the data should be submitted.
Common methods include:
GET
POST
We'll study HTTP methods and form submission more deeply when we reach backend development.
20. Putting It Together
🧠 Remember
type → What kind of input?
name → Field's submission name
id → Identifies the element
value → Input's value
placeholder → Hint
required → Must be provided
disabled → User can't interact normally
readonly → User can't edit
minlength → Minimum characters
maxlength → Maximum characters
Double Tap ❤️ For More
Remember:
label → Identifies the field
placeholder → Gives an example/hint
A placeholder should not normally replace a proper label.
14. readonly
<input
type="text"
value="Customer ID: 1024"
readonly>
The user can generally view the value but cannot edit it through the input.
15. disabled
<input
type="text"
value="Not available"
disabled>
A disabled control cannot normally be interacted with or submitted as a successful form control.
16. maxlength
Limits the number of characters.
<input
type="text"
name="username"
maxlength="20">
17. minlength
Specifies a minimum number of characters.
<input
type="password"
name="password"
minlength="8">
18. autocomplete
Helps the browser provide previously stored information.
<input
type="email"
name="email"
autocomplete="email">
This can make forms faster and easier to use.
19. Form Attributes
The
<form> element itself has important attributes.For example:
<form action="/register" method="post">
...
</form>
action specifies where the form data should be sent.
method specifies how the data should be submitted.
Common methods include:
GET
POST
We'll study HTTP methods and form submission more deeply when we reach backend development.
20. Putting It Together
<form action="/register" method="post">
<label for="name">Full Name</label>
<input
type="text"
id="name"
name="name"
required
autocomplete="name">
<label for="email">Email</label>
<input
type="email"
id="email"
name="email"
required
autocomplete="email">
<label for="password">Password</label>
<input
type="password"
id="password"
name="password"
minlength="8"
required>
<button type="submit">Create Account</button>
</form>
🧠 Remember
type → What kind of input?
name → Field's submission name
id → Identifies the element
value → Input's value
placeholder → Hint
required → Must be provided
disabled → User can't interact normally
readonly → User can't edit
minlength → Minimum characters
maxlength → Maximum characters
Double Tap ❤️ For More
❤11👍4
𝗧𝗢𝗣 𝟱 𝗙𝗥𝗘𝗘 𝗧𝗘𝗖𝗛 𝗖𝗢𝗨𝗥𝗦𝗘𝗦 𝗜 𝗪𝗜𝗦𝗛 𝗜 𝗛𝗔𝗗 𝗧𝗔𝗞𝗘𝗡 𝗦𝗢𝗢𝗡𝗘𝗥! 💻🎓
Discover 5 FREE tech courses to kick-start your learning journey and strengthen your resume. 🚀
✅ Learn Valuable Technical Skills
✅ Beginner-Friendly Learning Resources
✅ Build Practical Knowledge
✅ Strengthen Your Resume & Portfolio
✅ Prepare for Tech Career Opportunities
💡 The best investment you can make in 2026 is upgrading your skills!
🔗 𝗘𝗻𝗿𝗼𝗹𝗹 𝗙𝗼𝗿 𝗙𝗥𝗘𝗘👇 :-
https://pdlink.in/4Bw1PL9
⚡ Start learning today. Your future self will thank you!
Discover 5 FREE tech courses to kick-start your learning journey and strengthen your resume. 🚀
✅ Learn Valuable Technical Skills
✅ Beginner-Friendly Learning Resources
✅ Build Practical Knowledge
✅ Strengthen Your Resume & Portfolio
✅ Prepare for Tech Career Opportunities
💡 The best investment you can make in 2026 is upgrading your skills!
🔗 𝗘𝗻𝗿𝗼𝗹𝗹 𝗙𝗼𝗿 𝗙𝗥𝗘𝗘👇 :-
https://pdlink.in/4Bw1PL9
⚡ Start learning today. Your future self will thank you!
🌐 Web Development Roadmap — Part 22
Semantic HTML
So far, you've learned how to create HTML elements. Now we'll learn how to structure a webpage in a meaningful way using semantic HTML.
1. What Is Semantic HTML?
Semantic HTML means using HTML elements according to their meaning and purpose.
For example:
These elements tell the browser and developers what each part of the page represents.
2. Non-Semantic vs Semantic
A common non-semantic structure is:
A semantic structure is clearer:
The second structure communicates the purpose of each area.
3.
A header can contain:
• Logo
• Website title
• Introduction
• Navigation-related content
4.
It tells assistive technologies and browsers that these links are navigation.
5.
A page should generally have one main content area.
6.
Another section might be:
7.
Examples:
• Blog post
• News article
• Forum post
• Product review
8.
Examples:
• Related articles
• Sidebar
• Additional information
• Advertisements
9.
It may contain:
• Copyright information
• Contact information
• Related links
• Legal links
10. Complete Semantic Structure
A typical webpage might look like:
Semantic HTML
So far, you've learned how to create HTML elements. Now we'll learn how to structure a webpage in a meaningful way using semantic HTML.
1. What Is Semantic HTML?
Semantic HTML means using HTML elements according to their meaning and purpose.
For example:
<header>...</header>
<nav>...</nav>
<main>...</main>
<section>...</section>
<article>...</article>
<footer>...</footer>
These elements tell the browser and developers what each part of the page represents.
2. Non-Semantic vs Semantic
A common non-semantic structure is:
<div>
<div>Navigation</div>
<div>Main content</div>
<div>Footer</div>
</div>
A semantic structure is clearer:
<header>...</header>
<nav>...</nav>
<main>
<section>...</section>
</main>
<footer>...</footer>
The second structure communicates the purpose of each area.
3.
<header><header> represents introductory content for a page or section.<header>
<h1>My Portfolio</h1>
<p>Web Developer</p>
</header>
A header can contain:
• Logo
• Website title
• Introduction
• Navigation-related content
4.
<nav><nav> represents a major navigation section.<nav>
<a href="/">Home</a>
<a href="/about">About</a>
<a href="/contact">Contact</a>
</nav>
It tells assistive technologies and browsers that these links are navigation.
5.
<main><main> contains the primary content of the page.<main>
<h1>Latest Articles</h1>
<p>Explore our latest articles.</p>
</main>
A page should generally have one main content area.
6.
<section><section> represents a meaningful thematic section of content.<section>
<h2>About Me</h2>
<p>I am a web developer.</p>
</section>
Another section might be:
<section>
<h2>My Projects</h2>
<p>Here are some of my projects.</p>
</section>
7.
<article><article> represents a self-contained piece of content that could stand on its own.Examples:
• Blog post
• News article
• Forum post
• Product review
<article>
<h2>How to Learn HTML</h2>
<p>HTML is the foundation of web development.</p>
</article>
8.
<aside><aside> contains content related to the main content but not part of its primary flow.Examples:
• Related articles
• Sidebar
• Additional information
• Advertisements
<aside>
<h3>Related Articles</h3>
<a href="#">Learn CSS</a>
</aside>
9.
<footer><footer> represents footer information for a page or section.<footer>
<p>© 2026 My Website</p>
</footer>
It may contain:
• Copyright information
• Contact information
• Related links
• Legal links
10. Complete Semantic Structure
A typical webpage might look like:
❤5
<header>
<h1>My Website</h1>
</header>
<nav>
<a href="/">Home</a>
<a href="/about">About</a>
<a href="/contact">Contact</a>
</nav>
<main>
<section>
<h2>About Me</h2>
<p>I'm learning web development.</p>
</section>
<section>
<h2>My Projects</h2>
<article>
<h3>Portfolio Website</h3>
<p>A website showcasing my work.</p>
</article>
<article>
<h3>Weather App</h3>
<p>An application using a weather API.</p>
</article>
</section>
<aside>
<h3>Related Content</h3>
</aside>
</main>
<footer>
<p>© 2026 My Website</p>
</footer>
11. Visual Structure
Think of a webpage like this:
┌───────────────────────────────┐
│ HEADER │
├───────────────────────────────┤
│ NAV │
├───────────────────────────────┤
│ │
│ MAIN │
│ │
│ ┌───────────────────────┐ │
│ │ SECTION │ │
│ └───────────────────────┘ │
│ │
│ ┌───────────────────────┐ │
│ │ ARTICLE │ │
│ └───────────────────────┘ │
│ │
│ ASIDE │
│ │
├───────────────────────────────┤
│ FOOTER │
└───────────────────────────────┘
12. Why Semantic HTML Matters
Semantic HTML helps with:
Accessibility
Screen readers can better understand the structure of a webpage.
SEO
Search engines can better understand the meaning and organization of content.
Maintainability
Developers can understand the purpose of different parts of the code more easily.
Structure
The HTML becomes clearer and more meaningful.
13. Semantic HTML vs
<div><div> is a generic container.<div>
<h2>About Me</h2>
</div>
If the content represents a meaningful section, you can often use:
<section>
<h2>About Me</h2>
</section>
Don't use semantic elements simply because they sound better. Choose the element that accurately represents the content.
🧠 Remember
<header> → Introductory/header content<nav> → Navigation<main> → Primary page content<section> → Thematic section<article> → Self-contained content<aside> → Related/secondary content<footer> → Footer information Key Takeaway
Semantic HTML is about giving meaning to your webpage structure.
HTML
↓
Meaningful structure
↓
Better accessibility
↓
Better maintainability
↓
Clearer content structure
Double Tap ❤️ For More
❤6👍1