Your code is experiencing an issue due to the misconfiguration of your HTML and CSS selectors.
The problem lies in the absence of a class
attribute within your h1
tag.
<h1 class="heading">Heading!</h1>
This oversight is causing a discrepancy as your CSS references it with .heading
.
h1.heading {
color: indianred;
}
In essence, your CSS is designed to target elements that are both h1
and possess a class (.
) of heading
.
This corrected snippet showcases the functional code.
h1.heading {
color: indianred;
}
<h1 class="heading">BeeHaven Apiaries</h1>
An alternate solution involves adjusting the CSS rather than modifying the HTML.
To rectify this, eliminate the class
selector in the CSS to only target h1
tags.
h1 {
color: indianred;
}
Warning! Exercise caution when opting for this method, as all h1
tags will inherit the specified styles from the CSS.
The finalized code should resemble the following.
h1 {
color: indianred;
}
<h1>BeeHaven Apiaries</h1>
To summarize, there are two solutions available to rectify the issue.
The initial one entails editing the HTML by incorporating a class
attribute for proper identification by the CSS.
The secondary option requires adjusting the CSS to encompass all instances of h1
tags throughout the HTML document.