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

白昼怎懂夜的黑 提交于 2019-12-02 22:59:41

问题


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?


回答1:


This is what you need. No special coding required.

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



回答2:


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>



回答3:


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


来源:https://stackoverflow.com/questions/30996354/how-to-set-different-font-sizes-in-the-same-html-header

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!