Making a Website in HTML </div> error


#1
    <!DOCTYPE html>






  • Scott Belbin

  • Browse

  <li>Sign Up</li>
  <li>Log In</li>
  <li>Help</li>
 </ul> 

</div>



I keep getting "Oop, try again. Place both ul elements between the opening

and the closing ,/div> tags. Any ideas please?

#2

@scottbelbin,
As your post is NOT presenting all of your code...

Please re-edit your Post

  • select your code in the Post
  • then =click= on the </>-symbol-of-this-editor

Your code will then be in a pre-code state
and you will be able to make/present the proper indentations.


#3

indent preformatted text by 4 spaces





  • Scott Belbin

  • Browse

  <li>Sign Up</li>
  <li>Log In</li>
  <li>Help</li>
 </ul> 

</div>



Apologies, still new to this. Thank you for getting back to me. How's this?


#4

well that did not help !!!


#5
<!DOCTYPE html>




 <ul>
  <li>Scott Belbin</li>
  <li>Browse</li> 
 <ul> 
  <li>Sign Up</li>
  <li>Log In</li>
  <li>Help</li>
 </ul> 

</div>




Try this the old fashioned way, as it still doesn't appear to show the div="nav" or div="container" I have entered. I have place the "nav" under Body, and "container" on the line below that. I then have the ul elements, as you can see. I have then closed the divs underneath with a blackslash (/div).

#6

Try it by prepending 4 spaces to each line of code (never mind the correct indention)

This is my code in normal mode

This is my code in </> pre-code mode

#7
    <!DOCTYPE html>
<html>
  <body>
  <div class="nav">
   <div class="container">

 <ul>
  <li>Scott Belbin</li>
  <li>Browse</li> 
 <ul> 
  <li>Sign Up</li>
  <li>Log In</li>
  <li>Help</li>
 </ul> 

</div>
</div>
    </body>
</html>

That, my friend is a lot easier! Back to my original problem. I keep getting an error, and it advises me to place both ul elements between the opening and closing div. To my eye, they are. What am I missing please?


#8

@scottbelbin,

Well it seems you are NOT using a closing < /ul> Element

 <ul>
  <li>Scott Belbin</li>
  <li>Browse</li>
 </ul> 
 <ul> 
  <li>Sign Up</li>
  <li>Log In</li>
  <li>Help</li>
 </ul>

#9

Thank you for your time and patience! On to the next one...


#10

@scottbelbin,
So you know...

It all start's with you,
using a Browser
in which you load a HTML-file,
which we will call the HTML-Document.

This document has a minimal build of


<!DOCTYPE html>
  <html>
     <head>
          <title> </title>
     </head>
     <body>
     </body>
  </html>

The Browser =load's= this document into Memory
in a pattern that is described as
the Document Object Model
in short the DOM.
( the interpretation of the DOM is Browser & Version specific )

            html
             |
       +-----+------+
       |            |
     head          body
       |
     title

In the description of your document in DOM-talk...
you will encounter terms like:
parent children sibling descendants ascendants...

The HTML-Element has no parent
but is a parent to 2 child-Element's
the 'head'-Element
and
the 'body'-Element.

The 'head'- and 'body'-Element,
both being children to the 'html'-Element
are siblings to each-other.

The 'head'-Element is parent to the 'title'-Element...
the 'title'-Element is a child of the 'head'-Element
the 'title'-Element is also a descendant of the 'html'-Element.

The DOM has several interface's
over which you can access the data**/**information
held by the DOM.

One of the interface's is the Element-interface
you can divide the interface into
properties ( consisting of a property-key and it's associated VALUE )
and
methods ( giving you the functionality to manipulate the Elements )
https://developer.mozilla.org/en-US/docs/Web/API/Element
https://developer.mozilla.org/en-US/Learn/HTML/HTML_tags