I am wondering when and where to use section vs div in an html file. I know that should be used for information that is related to each other. However in a few of the lessons, i’ve seen the answer code use div where i have used section. I haven’t really seen section used at all in the answer codes. I remember from a lesson, it stated sections are good for syntax in that they are more specific than div. As well as a lesson about divitis so I have been trying to use section where I can. Just looking for any insight on this. Thank You!
I personally use divs for holding a single element inside a semantic tag. For example, holding elements if I need to apply a CSS flex property within a section. Or if I need another wrapper for a group of elements for the purpose of styling. Prioritize using semantic tags like section, and then use divs in grouping smaller elements.