JavaScript JavaScript Basics Introducing JavaScript Your First JavaScript Program

Laura Lappebn
Laura Lappebn
221 Points

Why am I not able to get the answer correct? Challenge Task 1 of 1 in add code inside Welcome to my site.

What do I need to know in order to get this answer?

index.html
<!DOCTYPE HTML>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>JavaScript Basics</title>
</head>

<body>
</body>

<alert>("Hello");
<document.write>("Welcome to my site");


// Write your code here.

</script>

</html>

1 Answer

John Cotter
John Cotter
1,767 Points

<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>JavaScript Basics</title> </head>

<body> </body>

<script> // Write your code here.

document.write('Welcome to my site');

</script>

</html>