背景(Backgrounds)
<body> 拥有两个配置背景的标签。背景可以是颜色或者图像。
背景颜色(Bgcolor)
背景颜色属性将背景设置为某种颜色。属性值可以是十六进制数、RGB 值或颜色名。
<body bgcolor="#000000"> <body bgcolor="rgb(0,0,0)"> <body bgcolor="black">
背景(Background)
相对地址,或绝对地址
<body background="clouds.gif">
基本的注意事项 - 有用的提示:
<body> 标签中的背景颜色(bgcolor)、背景(background)和文本(text)属性在最新的 HTML 标准(HTML4 和 XHTML)中已被废弃。W3C 在他们的推荐标准中已删除这些属性。
应该使用层叠样式表(CSS)来定义 HTML 元素的布局和显示属性。