2. (Linking JS) Code is functioning, but lesson tells me I'm wrong


#1

The code functions correctly in that the pop-up window opens with the "Hello Javascript!" text. However the lesson interface tells me it's wrong. What do I do? How can I move on?

<!DOCTYPE html>
<html>
<head>
  <link rel='stylesheet' type='text/css' href='css/styles.css'>
</head>

<body>

  <h1>Proficient in:</h1>
  <div class='skillset'>
    <div class='skill-html'>
      <h1>HTML &amp; CSS</h1>
      <p class='description'>
        <div class='projects-button'>Recent Projects</div>
        <ul class='projects'>
          <li>Broadway</li>
          <li>MOVE</li>
        </ul>
      </p>
    </div>

    <div class='skill-js'>
      <h1>JavaScript</h1>
      <p class='description'>
        <div class='projects-button'>Recent Projects</div>
        <ul class='projects'>
          <li>Password Validator</li>
          <li>Whale Talk</li>
        </ul>
      </p>
    </div>

    <div class='skill-jquery'>
      <h1>jQuery</h1>
      <p class='description'>
        <div class='projects-button'>Recent Projects</div>
        <ul class='projects'>
          <li>Coming soon...</li>
        </ul>
      </p>
    </div>
  </div>

<script src = 'js/main.js'></script>

</body>

</html>

#2

I don't see any obvious issues apart from one detail in the markup. Is this the code provided in the lesson? It has a validation issue in that P elements may not contain content that does not fit the 'phrasing content' model:

http://w3c.github.io/html/single-page.html#the-p-element

http://w3c.github.io/html/single-page.html#phrasing-content

If you notice the color highlighting indicates an error by coloring the endtag for the P white, instead of red. The P can be changed to a DIV in all three cases.

<div class="description">


</div>

It may not be the issue, but whomever wrote this was not up on the W3C specs.


#3

This topic was automatically closed after 7 days. New replies are no longer allowed.