Formatting Code


#1

Hello everyone,

I just started learning today, however my code is a nightmare to read and I'm struggling to read it back to spot mistakes. I think this is down to the lines of code all being in the same "line". Is there a way to fix this easily or should I be pressing SPACE to move them as I go? Please see below and example:

<!DOCTYPE html>
<html>
  <body>
  <div class="nav">
   <div class="container">
	<ul>
	  <li>Joshua Lawson</li>
	  <li>Browse</li>
	</ul>
	<ul>
	  <li>Sign Up</li>
	  <li>Log In</li>
	  <li>Help</li>
	</ul>
	</div>
  </div>
  <div class="jumbotron">
   <div class="container">
    <h1>Find a place to stay.</h1>
    <p>Rent from people in over 34,000 cities and 192 countires.</p>
   </div>
   <div>
   <h3>Travel</h3>
   <p>From apartments and rooms to treehouses and boats: stay in unique spaces in 192 countries.</p>
   <p>
   <a href="#">See how to travel on Airbnb</a>
   </p>
   </div>
   <div>
   <h3>Host</h3>
   <p>Renting out your unused space could pay your bills or fund your next location.</p>
   <p>
   <a href="#">Learn more about hosting</a>
   </p>
   </div>
   <div>
   <h3>Trust and Safety</h3>
   <p>From Verified ID to our worldwide customer support team, we've got your back.</p>
   <p>
   <a href="#">Learn about trust at Airbnb</a>
   </div>
  </div>
  </body>
</html>

Thanks!


#2

What is the error msg you are getting?


#3

I'm not getting any error messages, I just think it looks a mess and was wondering on the best/simple way to organise it?


#4

You could indent the items which are not indented and you could put in some comments so that you know what's going on..


#5

<html>
Works Again?
</html>