How do I add h2 to this code?
<td>
<a href="<?php the_permalink()?>"><b><?php the_title()?></b></a>
</td>
changing the <b>
to <h2>
produces a large font,
all help appreciated
How do I add h2 to this code?
<td>
<a href="<?php the_permalink()?>"><b><?php the_title()?></b></a>
</td>
changing the <b>
to <h2>
produces a large font,
all help appreciated
So change the way you are styling the h2 in the CSS.
Hello felgall, thank you for your quick reply,
I have tried a few code css combinations, yet without success, example blow:
<td>
<h5 class="item-title">
<a href="<?php the_permalink()?>"><b><?php the_title()?></b></a>
</h5>
</td>
Don’t use h5 tags just because they make the font smaller. The h1, h2, etc tags are meant to be used semantically with h1 being the top-level heading, h2 the next level in the hierarchy etc.
So stick to the h2 and like @felgall says use your CSS styles to make the font smaller. For example,
h2 {
font-size: 0.9em;
}
or whatever font size you want.
BTW this is a WordPress site isn’t it?
Hello WebMachine, thankyou for your quick reply, yes it is a Wordpress theme I am using/modifying,
Ok thank you I will make css adjustments and see how I get on,
best wishes
Don’t forget to remove the <b>
tags from inside the new heading.
Hello ralphm, thank you great info, maybe now I can get it to work …lol
best wishes
You can simply go into the source code of the website and choose the location for adding h2 and put it on there. some code is already share with you above.
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.