(Dec 8, 2020 03:58 PM)tux1 Wrote: The main reasons for using the different tags are:
1. To make the code easier to read, once the code starts getting long or if you are working with multiple people it just makes life easier
2. It helps automated bots, screen readers and search engine makes sense of your page
In short, it's a good habit to use the right html tags
I second this. Coding (HTML isn't a programming language but I mean it's at the very least similar to coding) isn't just a matter of "as long as it works that's all that matters"
I mean what if you've gotta go back to a project you wrote 6 months ago and rework some part of it and you then discover you didn't put comments in it anywhere and so now you've gotta spend all this extra time deciphering code you already wrote?
Trust me, dealing with that is a nightmare, that's why it's best practice to do things like using the right html tags and following certain style conventions/guidelines, like PEP8 for Python for example. PEP8 encourages you to name Python variables like this:
and not like this:
So yeah, probably best to just use the different tags for readability and to make life easier for anyone else that might get involved with whatever you're working on. Plus it's always a good idea to start developing good habits from the start.