kevint259 / tea-cozy

0 stars 0 forks source link

Best practices on nesting and indentation #2

Open tommygebru opened 5 years ago

tommygebru commented 5 years ago

Nice work on formatting your code with indentation another great way to improve readability. 👀 Indenting your code also helps point out the nested elements, and distinguish between parent/child elements.

Below I wrote an example of the nest/wrap relationship, another name for it would be the parent/child relationship.

    <div class="wrapping">
        <p class="nesting"></p> 
        <p class="nesting"></p>
    </div>

or

    <div class="parent">
        <p class="children"></p> 
        <p class="children"></p>
    </div>