This forum is now read-only. Please use our new forums at discuss.codecademy.com.

For Loops in PHP Forum

View Course » View Exercise

173 points
862a4ba0c393d2ccf1c30dd349030812?s=140&d=retro
Submitted by
viktorious
over 3 years ago

Why does the unordered list, <ul>, output an ordered list with numbers?

I thought ordered lists should be coded using however in this question it seems prints out an ordered list

     <body>
<h1>Languages you can learn on Codecademy:</h1>
<div class="wrapper">
  <**ul**>
    <?php
      $langs = array("JavaScript",
      "HTML/CSS", "PHP",
      "Python", "Ruby");
      foreach ($langs as $lang) {
          echo "<li>$lang</li>";
      }

      unset($lang);
    ?>
  </**ul**>
</div>

1 vote

permalink

Good answer Nooz93. I found this in the attached stylesheet tab:

ul {
  list-style-type: decimal-leading-zero;
  font-family: Tahoma, sans-serif;
}

329 points
E04a8624aa69d1da505fbd5d570faeaa?s=140&d=retro
Submitted by
Tzvi
over 3 years ago


0 votes

permalink

My guess is the type of the list has been manipulated in a separate style sheet (CSS).

111 points
Dcdde625aac4e16525aff4773b3249d0?s=140&d=retro
Submitted by
Nooz93
over 3 years ago


0 votes

permalink

So you have to take out the stars in the ul elements

781 points
540dec52282ae3fd46000466_99345759
Submitted by
Victor Rodriguez
about 3 years ago


0 votes

permalink

So you have to take out the stars in the ul elements

781 points
540dec52282ae3fd46000466_99345759
Submitted by
Victor Rodriguez
about 3 years ago