Exercises in HTML
? HTML Exercises for Practice
Here are some exercises to help you strengthen your HTML skills step-by-step:
Exercise 1: Basic Page Structure
Create an HTML page with a title "My First HTML Page"
Add a heading
<h1>with your nameAdd a paragraph
<p>describing your favorite hobby
Exercise 2: Create a List
Make an ordered list (
<ol>) of your top 5 favorite movies or booksThen create an unordered list (
<ul>) of your favorite foods
Exercise 3: Links and Images
Add a hyperlink to your favorite website (make it open in a new tab)
Insert an image from the web using the
<img>tag with properalttext
Exercise 4: Build a Simple Form
Create a form with the following fields:
Name (text input)
Email (email input)
Gender (radio buttons)
Favorite color (dropdown/select)
Submit button
Exercise 5: Create a Table
Make a table to display a schedule with columns: Day, Subject, Time
Add at least 3 rows with sample data
Exercise 6: Use Semantic Elements
Create a page using
<header>,<nav>,<main>,<footer>Inside
<nav>, add links to Home, About, ContactInside
<main>, add a sample article with a heading and paragraph
Bonus Challenge: Add CSS Styling
Add a
<style>block in your HTMLChange the background color of the page
Style your headings and paragraphs with different fonts and colors
If you want, I can also provide answers or code samples for any exercise! Just ask.