🌐 HTML Practice Test (10 Questions)
Q1. Basic Structure
Create a basic HTML webpage using the correct structure of <html>, <head>, and <body> tags.
Inside the <title> tag, write “My First Webpage”, and inside the body write a simple message — Welcome to HTML Practice!
Q2. Text Formatting
Write HTML code to display the following text with formatting:
-
A main heading saying “HTML Formatting Practice”
-
A paragraph describing what HTML is
-
Use
<br>to break the line between sentences -
Add some extra spacing using
Q3. Headings
Create a webpage that displays all six heading levels (<h1> to <h6>) with the text:
"Heading 1", "Heading 2", ... up to "Heading 6"
Each heading should be on a new line.
Q4. Font Tags
Write HTML code to show your name in:
-
Font size 6
-
Font color red
-
Font face Arial
Use the <font> tag for this.
Q5. Lists
Create the following lists:
-
An unordered list of three fruits
-
An ordered list of three countries
-
A definition list with terms and definitions:
-
HTML → HyperText Markup Language
-
CSS → Cascading Style Sheets
-
Q6. Images
Add an image to your webpage using the <img> tag with:
-
A border of 5
-
Height = 300 and Width = 300
-
An alternate text that says “My Picture”
Use any local or online image source.
Q7. Background and Text Color
Create a webpage with:
-
Background color blue
-
Text color yellow
-
Write a heading “Welcome to My Colorful Page!”
Use the <body bgcolor> and text attributes.
Q8. Hyperlinks
Add three hyperlinks:
-
A link to Wikipedia that opens in a new tab
-
A link to Google
-
A graphical hyperlink (clickable image) that links to any website of your choice
Q9. Internal Page Link (Anchor)
Create a webpage that contains:
-
A link at the top saying “Go to Bottom”
-
A section at the bottom of the page with a name anchor “bottom”
-
At the bottom, add a link back saying “Go to Top”
Use <a href="#bottom"> and <a name="bottom">.
Q10. Tables
Create a table with a border of 1, cell spacing 5, and cell padding 5.
The table should have:
-
2 rows and 3 columns
-
Headings in the first row: Name, Age, Country
-
Any sample data in the second row.
No comments:
Post a Comment