标签 | 描述 |
---|---|
<html> | 定义 HTML 文档。 |
<body> | 定义文档的主体。 |
<h1> to <h6> | 定义 HTML 标题 |
<hr> | 定义水平线。 |
<!--> | 定义注释。 |
下面列出了适用于大多数 HTML 元素的属性:
class | classname | 规定元素的类名(classname) |
id | id | 规定元素的唯一 id |
style | style_definition | 规定元素的行内样式(inline style) |
title | text | 规定元素的额外信息(可在工具提示中显示) |
<p> | 定义段落。 |
<br /> | 插入单个折行(换行)。 |
<html>
<body style="background-color:PowderBlue;">
<h1>看! Styles and colors</h1>
<p style="font-family:verdana;color:red">
This text is in Verdana and red</p>
<p style="font-family:times;color:black">
This text is in Times and green</p>
<p style="font-size:10px">This text is 10 pixels high</p>
</body>
</html>
我们查看一下 效果
大家学习的时候可以使用http://www.w3school.com.cn/tiy/t.asp?f=html_styles进行学习,一起加油吧!感谢网站给提供的平台