QUESTION IMAGE
Question
- explain why html needs both a <head> and a <body> section.
- what would happen if you forgot to close a <ul> or <ol> tag?
- why is indentation important in writing clean html code?
- write the html code that creates a webpage with:
- a main heading: \my favorite foods\
- a paragraph explaining why you like them
- a numbered list of 3 foods
- fix the html errors in the following code:
<html>
<head>
<title>my page</title>
</head>
<body>
<h1>welcome</h1>
<p>this is my website</p>
<ol>
<li>home
<li>about
</body>
</html>
text entry
copy and paste or type your submission right here.
edit view insert format tools table
12pt paragraph b i u a t²
Brief Explanations
<htm>to<html>: The correct opening tag for an HTML document is<html>.<hed>to<head>: The tag for the head section of an HTML document is<head>.<title>My Page<title>to<title>My Page</title>: The<title>tag needs a closing tag</title>.<body/>to<body>: The<body>tag should be properly opened and closed. Since it has content inside (like the<h1>,<p>, and<ul>tags), it should be<body>(opening) and then</body>(closing) after its content.<h1>Welcome</h2>to<h1>Welcome</h1>: The opening tag is<h1>, so the closing tag should also be</h1>.<p>This is my website<p>to<p>This is my website</p>: The<p>(paragraph) tag needs a closing</p>.<ul>tag: It needs a closing</ul>tag after its<li>(list item) content.
Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
<html>
<head>
<title>My Page</title>
</head>
<body>
<h1>Welcome</h1>
<p>This is my website</p>
<ul>
<li>Home</li>
<li>About</li>
</ul>
</body>
</html>