html样式都有哪些?
1、background-color即背景色,当我们设置成red,如图
<body style="background-color:red">背景this is background</body>

2、设置h2标题的背景色,是什么样呢?我们设置为红色看下
<h2 style="background-color:yellow">标题This is a heading</h2>

3、换成段落p呢?
<p style="background-color:green">段落This is a paragraph.

4、整个效果运行下,如图

5、font-family字体,h1的字体为宋体,如图
<h1 style="font-family:'宋体'">heading h1</h1>

6、设置字体、颜色和大小的p样式,结果是怎样的呢?
<p style="font-family:arial;color:red;font-size:20px;">paragraph p

7、设置文本居中,以h1为例,效果如下
<h1 style="text-align:center">heading h1</h1>

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
阅读量:114
阅读量:38
阅读量:167
阅读量:118
阅读量:82