Reputation: 28060
I would like to place 2 blocks of <h4>
text side by side. However, the code below places them one on top of the other.
<h4><b>name</b> : {{name}} </h4> <h4> <b>number</b> : {{number}} </h4>
How should the html code look like to place them side by side without using css? I tried googling but the solutions use css. I do not mind using bootstrap. It will be nice if bootstrap has some quick way to do it.
Thank you.
Upvotes: 0
Views: 819
Reputation: 402
if you are using bootstrap you can use it like:
<div class="row">
<div class="col-md-6"><h4><b>name</b> : {{name}} </h4></div>
<div class="col-md-6"><h4><b>number</b> : {{number}} </h4></div>
</div>
Hope it helped.
Upvotes: 3
Reputation: 1094
The easiest way is using table on your html
<table>
<tr>
<td><h4>Name:</h4></td>
<td><h4>Number:</h4></td>
</tr>
</table>
Upvotes: 1
Reputation: 201738
The only way in HTML, without CSS, is to use a table:
<table>
<tr><td><h4><b>name</b> : {{name}} </h4>
<td><h4><b>number</b> : {{number}} </h4>
</table>
Whether this makes sense is a different issue. A heading should be a heading for something, and it is difficult to see what that might be. Probably you should use completely different markup.
Upvotes: 3