sourcechange
sourcechange

Reputation: 75

How to put the text front of a header?

Why I cannot put a text front of header.

I want to put them on a line without combining them (don't want put it in <h3>)

<h3>Software</h3><a>version<a>

Upvotes: 0

Views: 896

Answers (2)

andreas
andreas

Reputation: 16936

Headings are per default block level elements. Simply set your heading to display: inline-block; to make them display inline but keeping block element properties:

h3 {
  display: inline-block;
}
<h3>Software</h3> <a href="#">version</a>

Upvotes: 6

Hariom Singh
Hariom Singh

Reputation: 1540

You can also use this code. Don't forgot to close anchor tag!

h3 {
  display:inline;
}
<div>
  <h3>Software</h3>
  <a href="#">version</a>
</div>

Upvotes: 3

Related Questions