Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

26. explain why html needs both a <head> and a <body> section. 27. what…

Question

  1. explain why html needs both a <head> and a <body> section.
  2. what would happen if you forgot to close a <ul> or <ol> tag?
  3. why is indentation important in writing clean html code?
  4. 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
  1. 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²

Explanation:

Brief Explanations
  1. <htm> to <html>: The correct opening tag for an HTML document is <html>.
  2. <hed> to <head>: The tag for the head section of an HTML document is <head>.
  3. <title>My Page<title> to <title>My Page</title>: The <title> tag needs a closing tag </title>.
  4. <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.
  5. <h1>Welcome</h2> to <h1>Welcome</h1>: The opening tag is <h1>, so the closing tag should also be </h1>.
  6. <p>This is my website<p> to <p>This is my website</p>: The <p> (paragraph) tag needs a closing </p>.
  7. <ul> tag: It needs a closing </ul> tag after its <li> (list item) content.

Answer:

<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>