HTML Test
HTML Test
Create a simple HTML document with a title "My Web Page" and headings from <h1> to <h6> each containing the
text "Heading 1" through "Heading 6".
Write an HTML snippet that includes a paragraph with bold, italic, and underlined text. The paragraph should say:
"This is bold, this is italic, and this is underlined."
Create a hyperlink that links to "https://www.example.com" with the text "Visit Example".
Create an ordered list with three items: "First item", "Second item", and "Third item". Below it, create an unordered
list with three items: "Item A", "Item B", and "Item C".
Create a table with 2 rows and 3 columns. The first row should contain the headers "Name", "Age", and "City". The
second row should contain the data "Alice", "30", and "New York".
Create a paragraph with the text "This is a paragraph with a class." and apply a class named "myClass". Then,
create another paragraph with the text "This is a paragraph with an ID." and apply an ID named "myID".
Create a <div> element with a data attribute data-role set to "admin". Inside the <div>, add the text "Admin
Content".
Embed an image with the source "image.jpg" and an alternative text "Example Image".
Task 9: Implementing Input Control Elements and Forms
Create a simple form with one text input, one password input, and a submit button. The form should have the action
"submit_form.php".
Task 10: Using Div Elements for Structuring and Styling Content
Create a <div> element with a class "container". Inside the <div>, add another <div> with the class "header"
containing the text "Header". Below it, add another <div> with the class "content" containing the text "Content goes
here".
Create a navigation bar using an unordered list. The navigation bar should have three links: "Home", "About", and
"Contact".
Embed an iframe that displays the page "https://www.example.com" with a width of 600 pixels and a height of 400
pixels.
Write a simple HTML document that includes the manifest attribute in the <html> tag pointing to a file named
"cache.appcache".
Create a button that displays an alert saying "Button clicked!" when clicked.
HTML Basics Coding Test Answers
Task 10: Using Div Elements for Structuring and Styling Content
html
Copy code
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Div Elements</title>
</head>
<body>
<div class="container">
<div class="header">Header</div>
<div class="content">Content goes here</div>
</div>
</body>
</html>