I am trying to do do a small testing using bootstrap, where I want to show h1 only for desktop /large and h2 only for mobile but when I use the following , both h1 and h2 show-up on all screens .
h1 and h2 is input element and writing condition depending 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>
}