I have this html
<div class="html-input goto-card-label">Header <br> Subtitle</div>
CSS is making the entire label bold:
.goto-card-label {
font-weight: bold;
}
Is there a CSS only approach to make the text after the <br>
tag as font-weight: normal;
without changing the html at all?
Note: I likely cannot use the content
css property since the text will not always be what I put in the example.
2
Answers
Try following ways
you can use span tag with inline CSS Styling
You can approach your problem using
::first-line
pseudo-element to the first line of the text withindiv
element.