Complete the code to create a basic HTML page structure.
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>[1]</title> </head> <body> <h1>Welcome to my website</h1> </body> </html>
The <title> tag sets the page title shown in the browser tab. Here, "My Website" is the correct title text.
Complete the code to add a paragraph inside the body.
<body>
[1]
</body>for paragraphs.
The <p> tag is used to add paragraphs in HTML. It is the correct choice to add a paragraph inside the body.
Fix the error in the code by completing the missing tag.
<html lang="en"> <head> <meta charset="UTF-8"> <title>Page Title</title> </head> [1] <h1>Heading</h1> </body> </html>
The <body> tag is missing and is needed to wrap the visible content of the page.
Fill both blanks to create a link that opens in a new tab.
<a href="[1]" [2]>Visit OpenAI</a>
The href attribute sets the link URL. The target="_blank" attribute makes the link open in a new tab.
Fill all three blanks to create an accessible image with alternative text.
<img src="[1]" alt="[2]" width="[3]">
The src attribute points to the image file. The alt attribute provides descriptive text for screen readers. The width sets the image width in pixels.