在html中包含几个文本格式命令

问题描述 投票:0回答:1

非常基本的问题:对于大猩猩软件,我想居中对齐文本并增加html中的字体大小,但我似乎找不到方法。

这是两个单独的命令:

<p style="font-size: 150%;">This is my text. %</p>'

<p style="text-align: center;">This is my text.</p>

我尝试了类似的方法,但是没有用:

<p style="font-size: 150%;" style="text-align: center;">This is my text. %</p>

谢谢

html format gorilla
1个回答
0
投票

要回答您的问题,请使用分号

<p style="font-size: 150%; text-align: center;">This is my text. %</p>

但更好-使用类和样式表:

.bigCenter {
  font-size: 150%;
  text-align: center;
}
<p class="bigCenter">This is my text. %</p>
© www.soinside.com 2019 - 2024. All rights reserved.