dimanche 4 juin 2017

What is the difference of applying a CSS class/id directly to a tag vs wrapping the tag in DIV tags with the same class/id?

What is the difference of

<ol class="specialClass">
  <li>Hello World!</li>
</ol>

versus

<div class="specialClass">
  <ol>
    <li>Hello World!</li>
  </ol>
</div>

I'm pretty green when it comes to webdesign and as such I have MANY simple questions that usually a Google search or two can answer. However, I couldn't find an answer that explicitly answered this. I plan on experimenting and researching it further, but it'd be nice to get an answer to directly explain it (if possible) or a link to an explanation. This is my first question I'm asking on here and it's not addressing a specific issue/problem so hopefully that's okay. I guess if it gets downvoted to oblivion then I'll know. Thanks!




Aucun commentaire:

Enregistrer un commentaire