Question

What is wrong with this code? (5 pts) <html> <body> <h1> Hello world </h1> </body> <head>...

What is wrong with this code? (5 pts)

<html>

<body>

<h1> Hello world </h1>

</body>

<head>

<title>My First Script </title>

</head>

</html>

Homework Answers

Answer #1

There are couple of issues, viz.,

1. DocType is missing. e.g. “<!DOCTYPE html>”.

2 Also consider adding a "lang" attribute to the html start tag to declare the language of this document.

3. Element Head can only be used as the first element in an html element if at all it is present

Better HTML would be

<!DOCTYPE html>

<html lang="en">

<head>

<title>My First Script </title>

</head>

<body>

<h1> Hello world </h1>

</body>
</html>

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
What's wrong with the overall structure of the HTML tags shown below? <html lang="en"> <head> <meta...
What's wrong with the overall structure of the HTML tags shown below? <html lang="en"> <head> <meta charset="utf-8"> <meta name="description" content="Example Page"> <title>Find the Mistake</title> <body> <h1>Content models</h1> <p> In HTML 4 there were only two main content models, block and inline level elements. <b>Block level</b> elements would stack on top of each other in normal document flow while <b>inline level</b> elements typically appear <em>within</em> the flow of text content.</p> </body> </head> </html> The body section is inside the head section...
The following code shows the head and body sections in an HTML file: <head> <script> function...
The following code shows the head and body sections in an HTML file: <head> <script> function init() { var x, y, z; z = document.getElementById("abc").innerHTML; y = "B"; x = "C"; document.getElementById("abc").innerHTML = x+y+z; } </script> </head> <body onload="init();"> <p id="abc">A</p> </body> What would be displayed on the browser when the above webpage is opened? BC CB or CBA or A or ABC
What is the behavior of the link shown in this HTML code? <body> <h1>An Amazing Link</h1>...
What is the behavior of the link shown in this HTML code? <body> <h1>An Amazing Link</h1> <p>Click here for more information about <a href="../../main/info/aboutLIL.htm" title="Within Site Link">LinkedIn Learning </a></p> </body> A. The link navigates up two folder levels from current position, navigates down two folder levels, then loads aboutLIL.htm B. The link navigates down two folder levels, then loads aboutLIL.htm C. The link navigates up two folder levels from current position, then loads aboutLIL.htm D. The link navigates down two...
Modify this HTML code so that the user is prompted to enter a 4 digit identification...
Modify this HTML code so that the user is prompted to enter a 4 digit identification number. <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html> <html> <head> <meta charset="ISO-8859-1"> <title>Booking System</title> </head> <body> <h1>Welcome to the Conference Room Booking System</h1> <form action="MyServlet">    <input type="submit" value="Identification" /> </form> </body> </html>
!DOCTYPE html html head style /style /head body h1This is a Heading/h1 pThis is a strongparagraph/strong,...
!DOCTYPE html html head style /style /head body h1This is a Heading/h1 pThis is a strongparagraph/strong, with some words more strongimportant/strong than others /p pThis is another paragraph./p ul liApple/li liOrange/li liPear/li /ul table tr thFirstname/th thLastname/th /tr tr tdPeter/td tdGriffin/td /tr tr tdLois/td tdGriffin/td /tr /table /body /html Your tasks for this Critical Thinking activity are: Hide the h1 element. It should not take up any space. Display the list items as inline elements. Display the strong elements as...
<!doctype html> <html lang=”en”>   <head>     <title>Principal Calculation Form</title>     <meta charset="utf-8"/>         
<!doctype html> <html lang=”en”>   <head>     <title>Principal Calculation Form</title>     <meta charset="utf-8"/>                   <script src="code.js"></script>   </head>      <body onload="setFocus();">     <div class="container">                                       <div class="main">                                                                                <form action="#" method="post" name="form_name" id="form_id" class="form_class" >                                                                           <h2>--Principal Loan Form--</h2>                                                                                                                                                      <h5>Disclaimer: This software by no mean will precisely predict your mortgage through your lender company.  This Software will only assume the four items below in order to make an educated guess or prediction to your exact mortgage interests amount and the duration of your loan from your lender. <img...
JAVASCRIPT/HTML: Please read 10 numbers that are listed below, edit the code given to sort the...
JAVASCRIPT/HTML: Please read 10 numbers that are listed below, edit the code given to sort the numbers from least to greatest, and then print those numbers. 10 numbers = { 9, 3, 2, 1, 10, 30, 4, 6, 7, 8} Submit the code and a screenshot of the output. [Reference JavaScript code] <html> <body> <H1>prompt()</h1> <p id="pro"></p> <script> // Array creation var num= new Array(); var ix = 0; // Read 10 numbers for (ix = 0; ix < 10;...
What is wrong with the following code segment, assumming it compiles correctly? char *a = "Hello";...
What is wrong with the following code segment, assumming it compiles correctly? char *a = "Hello"; char *b = " Mom"; while( *b != '\0' ) { *a = *b; a++; b++; }
[Lab Task HTML/JAVASCRIPT] Please read 10 numbers that are list below, sort the numbers and then...
[Lab Task HTML/JAVASCRIPT] Please read 10 numbers that are list below, sort the numbers and then print those numbers. 10 numbers = { 9, 3, 2, 1, 10, 30, 4, 6, 7, 8} Output should have a sorted list [Reference JavaScript code] <html> <body>     <H1>prompt()</h1>     <p id="pro"></p>     <script>        // Array creation        var num= new Array();               var ix = 0;        // Read 10 numbers        for (ix = 0; ix < 10; ix++)...
The funciton my_strcpy(char dest, const char cource) is to copy "hello world" from source to dest....
The funciton my_strcpy(char dest, const char cource) is to copy "hello world" from source to dest. Do not use the library. The copy process will only stop at the last "\0". Make sure dest is large enough to any lenght of sentence inputted. The following is my code. The program copy the first letter of "hello world" which is "h", but the requirement is to copy the whole sentence "hello world". Thank you for your helps #include <iostream> using namespace...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT