Hard to believe that Alpha 5 has been working and learning for 6 weeks already! Today, we started to delve into some of the bigger changes that came with the development of HTML5 and why they’re objectively better to use than the <div>
element when you can. To that end, we also officially started talking about the ‘class ‘ attribute and the merit that can come from its use.
Some of the ideas that were talked about in today’s lesson are ones that I’ve heard, and even to some degree used, before. I’ve used <header>
, <footer>
, and ‘class’
a few times over the last several months. While i’d known it was used to describe a group of text in order to project certain style elements, I really hadn’t put much thought into why usage of one element was better than another.
In reality, it all comes down to readability.
For most projects I, and my classmates, will work on going forward in our careers, most will not be permanently maintained by us. Not only does having clean code that is easy to follow make it easy for the next person who may work on, or even just look at, your code, but it also makes it easier to manipulate yourself when undergoing updates or different design ideas you may want to implement.
Some of the sites that I like visually have some not so readable code. It’s very hard to follow, and that’s mostly because it’s a big group of ‘div’ elements. It’s not overly clear what code makes what, and if someone else were to take over the page at some point, I can see how hard it would be to follow. At that point you may as well just start from scratch!
We’ve been writing more code lately, and Derek has been helping us to see ways to not only make the page more attractive for the user, but also how to make the code more readable for those who choose to inspect it. It’s been super helpful, and is gonna make it that much easier going forward when we begin adding more elements to what we already know.