I'm taking a beginning web design class on Treehouse, and I have a question about centering a class in HTML with CSS, It's not coming out right, even though I have checked instructions. Can someone please look at this code and tell me what I've done wrong?
Here's the HTML:
<main class="flex">
<div class="card">
<h2>class="card-title">Background</h2>
And, Here's the CSS:
.card-title {
text-align:center;
}
The output is like this: "class="card-title">Background"
I'm sure the answer is something super simple, because this is a simple course. But I'm just learning, and I'm rather nervous, so any help you can provide will be awesome!
<h2 class="card-title">Background</h2>
- This will fix it.