how to set different font sizes in the same html header?

5.2k views Asked by At

I want to create an html header as follows

"Version1: (10.3.4) vs Version2: (10.3.4)"

and I want the version number be smaller than the words "Version1" and "Version2"

how can I do this?

3

There are 3 answers

1
vanntile On BEST ANSWER

This is what you need. No special coding required.

<h1>Version1: <small>(10.3.4)</small> vs Version2: <small>(10.3.4)</small></h1>

1
m4n0 On

Wrap the version number inside a span and give it a different font-size.

span {
  font-size: 0.5em;
}
<h1>"Version1: <span>(10.3.4)</span>  vs Version2: <span>(10.3.4)</span>"</h1>

2
Panagiotis Stoupos On
"Version1:<span style="font-size:10px;"> (10.3.4)</span>  vs Version2: <span style="font-size:10px;">(10.3.4)</span>