DEV Community

Richard Pascoe
Richard Pascoe

Posted on • Edited on

Indentation and Sections

As my journey with freeCodeCamp continues, I have spent the last couple of days learning about everything from nesting and indentation, to the use of the section element for improved accessibility and SEO.

A nesting and indentation example is below:

<main>
  <h1>Most important content of the document</h1>
  <p>Some more important content...</p>
</main>
Enter fullscreen mode Exit fullscreen mode

Whereas I have prior knowledge of such things, having completed the Responsive Web Design certification in the past, if you aren't using that knowledge on a regular basis it soon fades away - lost in the sands of time.

No where else did this become more apparent than with the exercises on the section element, which I had little to no prior recollection of. With my memory refreshed, it all made perfect sense as way to ensure your code remains easy to read, as shown in the following example:

<section>
  <h2>Section Title</h2>
  <p>Section content...</p>
</section>
Enter fullscreen mode Exit fullscreen mode

Logging back into freeCodeCamp, I see the next lesson is the creation of unordered lists. I'll share my thoughts on this and more in the next part of this series. Until then, remember: obsolete comments are worse than no comments.

Written by a Human logo

Top comments (2)

Collapse
 
ruanaragao profile image
Ruan Aragão

It's great to see your posts about your journey. I loved a phrase: "lost in the sands of time", I'm going to adopt it from now.

To infinity and beyond.

Collapse
 
richardpascoe profile image
Richard Pascoe

Thank you, Ruan. Very kind of you to say so. When I think of the Python courses I did during lockdown and how little I've retained, I know I have to become more consistent and posting helps with that!