ashish chaudhary
Web developmentI added a class to the heading, but the CSS rule does not seem to apply.
<style>
welcome { color: #216653; }
</style>
<h1 class="welcome">Hello, learner</h1>
CookieSensei starter Q&A · example discussion.
Loading…
I added a class to the heading, but the CSS rule does not seem to apply.
<style>
welcome { color: #216653; }
</style>
<h1 class="welcome">Hello, learner</h1>
CookieSensei starter Q&A · example discussion.
A CSS selector beginning with a dot matches a class. Without the dot, welcome would match an element named welcome instead. Check the selector spelling and the class attribute. If the CSS is in another file, also check the stylesheet link and whether the browser loaded that file. Change one thing at a time so you can see what fixed it.
<style>
.welcome { color: #216653; }
</style>
<h1 class="welcome">Hello, learner</h1>
CookieSensei starter Q&A · example discussion.