Currently, I am experimenting with Bootstrap to display h1 only on desktop/large screens and h2 only on mobile devices. However, despite my efforts, both h1 and h2 appear on all screen sizes.
The h1 and h2 elements are input fields and the condition for their display depends on whether they are filled or not.
if(h1 != null){
<h1 class="d-none d-lg-block d-xl-none"> Test 1</h1>
}
else{
<h2 class = "d-block d-sm-none"> Test 2 </h2>
}