如何更改HTMLstring中的字体大小?

我使用了一个在线HTML制造商来获得这个

<p><span style=\"font-family: arial, helvetica, sans-serif; font-size: x-large; color: #993300;\">A <strong>canyon</strong>&nbsp;is a deep, narrow valley with steep sides. &nbsp;Many canyons have rivers or streams running through them.</span></p> 

但是字体太小了,当我把一个更大的尺寸放在html制作器中,并把它复制到我的代码中时,它仍然显示出相同的大小。 我在Web视图中使用它来显示一些自定义格式的文本。

你可以把一个实际的值放在font-size属性中,例如font-size:48px 。 如果你input一个足够大的数字,它应该显示大于使用x-large

为什么你在报价之前有“”? 它不应该是:

 <span style="font-family: arial, helvetica, sans-serif; font-size: x-large; color: #993300;"> 

有两种方法可以解决这个问题。

第一种方式已被弃用,所以你不应该使用这个方法:

<font size="5" face="arial" color="red">

HTML负责布局,因此包括devise和格式不好。

第二种方法是通过CSS来操作:

h1 {font-size:250%}

您可以使用像素来代替百分比。

祝你好运!