My question concerns an HTML checkbox containing an h2 within the same div element.
h2.childcares {
font-family: Source Sans;
color: black;
background-color: #ff9f01;
display: inline;
padding: 5px;
border: 1px solid blue;
border-radius: 15px;
}
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="childcares" unchecked>
<label class="custom-control-label" for="childcares"></label>
<h2 class="childcares">Childcares</h2>
</div>
Here is the visual representation:
https://i.sstatic.net/KRtke.png
I would like to align the checkbox with the center of the h2 tag.