I am currently enrolled in an introductory web design course on Treehouse, and I have encountered a problem with centering a class in HTML using CSS. Despite following the instructions closely, my code is not displaying correctly. Can someone please review the code below and point out what mistake I have made?
Below is the HTML:
<main class="flex">
<div class="card">
<h2>class="card-title">Background</h2>
And, here is the associated CSS:
.card-title {
text-align:center;
}
The current output looks like this: "class="card-title">Background"
I believe the solution to this issue is likely straightforward since this is a beginner-level course. However, as a novice learner, I find myself feeling a bit anxious. Any assistance you can provide would be greatly appreciated!