HTML semantics and styling
css, html
Solution
I assume that it is important to use the tags that most accurately convey the meaning of their contents
You assume correctly.
I would say yes, absolutely always try to use the appropriate element for the type of content/purpose you intend. Elements have names/designations for a reason, so your code can be structured in a way that makes semantic sense. Why is this important? Well ignoring SEO for which it plays an important part, or ease of access regarding your code, this is the intended design of HTML.
Not using a specific element because it has default styling applied is not a sensible or really logical course of action in this context. This is especially in light of the fact that when you compare browser-specific styling, most elements may have default styles applied.
I do not want to get into a habit of writing extra code if it is considered best practice not to do so
Bad practice to some degree is subjective, otherwise it is simply right or wrong- in this case it wont be game breaking to not use the correct tags, however you will be going against their intended use according to specification, so it would most certainly be bad practice.
See:
- Semantic HTML (Wikipedia)
- Semantic Web (Wikipedia)
Problem
My question is this – is it still best practice to use certain HTML tags even if you would then need to style them differently to how a browser interprets and displays those tags? For example – the HTML5 `<blockquote>` tag will start on its own line, with default margin and padding, and with an indent. However – if you do not wish there to be an indent, should you still use the `<blockquote>` tags in order to convey meaning to the browser and search engine, and then apply CSS to reduce/rid the indent, or should you just use a `<p>` tag for example? It’s not much effort to restyle the blockquote element, and I assume that it is important to use the tags that most accurately convey the meaning of their contents, but at the same time I do not want to get into a habit of writing extra code if it is considered best practice not to do so.