I have a headline in my header and in another part of the content. I've been told that this can impact SEO, but I'm just starting out by copying other people's pages and trying to replicate their styles without looking at their code.
The styling works fine for my headline when I target h1 directly, but it doesn't apply when I target h1 within a specific section class.
h1 {
text-align: center;
font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
font-size: 1.7em;
font-weight: 400px;
margin: 1px auto 13px;
}
.header h1 {
border-top: 3px double #232323;
padding-top: 10px;
font-family: inherit;
}
<body>
<h1>This is a headline</h1>
<section class="header">
<h1>This is a headline</h1>
</section>
</body>
My assumption is that the .h1 class rule is taking precedence over the h1 rule. If this is true, how can I add the top border to my h1 while still inheriting its properties?
I apologize if I am butchering any CSS terminology.