手抄报 安全手抄报 手抄报内容 手抄报图片 英语手抄报 清明节手抄报 节约用水手抄报

html样式都有哪些

时间:2024-10-14 04:22:05

1、background-color即背景色,当我们设置成red,如图<body style="background-color:red">背景this is background</body>

html样式都有哪些

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

html样式都有哪些

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

html样式都有哪些

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

html样式都有哪些

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

html样式都有哪些

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

html样式都有哪些

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

html样式都有哪些
© 手抄报圈