Are there any potential downsides to applying CSS to the <section>
, <header>
, <article>
, and <footer>
elements? I vaguely remember reading somewhere that these elements should not be styled, but I can't seem to locate the source and I can't identify a valid reason to avoid using them.
In my new web layout, I am heavily utilizing these elements. Currently, I am hesitant to assign classes or standard CSS styles to them, although I am struggling to find a legitimate reason for this hesitation aside from vague recollections of cautionary advice.
Allow me to provide an example of my usage:
<body>
<header>
Header of the page
</header>
<div class="wrap">
<div class="content-list">
<article>
<header>
<h1>Article title</h1>
</header>
<p></p>
<p></p>
<footer>
<a href="#">Read more</a>
</footer>
</article>
</div>
</div>
<footer>
Footer of the page
</footer>
</body>
Occasionally, within the div with the content-list class, there is an unordered list where each list item contains an article structured similarly to what is currently displayed. The header in the article is always styled as white, while the footer consistently features a "read more" link (or some other exit link). The paragraph elements contain various content.
I am questioning this because I am customizing the appearance of the h1 element inside the header and the anchor tag inside the footer. However, it occurred to me that styling the header itself could potentially eliminate the need for separately styling the h1.