Ankit Rustagi Ankit Rustagi - 2 months ago 9
CSS Question

Display two hyperlinks in one line

I am trying to display two hyperlinks using anchor tags. I have the following code to display hyperlinks

<li>
<a href="link1"><h4>link1</h4></a> &
<a href="link2"><h4>link2</h4></a>
</li>


but the links are displayed like

link1
&
link2


how can i display the links like this

link1 & link2

Answer

Remove the <h4> tag or set the css style: h4 {display:inline}