背景颜色:
style="background-color:yellow;"
例如:<body style="background-color:yellow;">
那么这一整个body的背景颜色都是黄色。
字体样式、结构、大小:
style="font-family:arial;color:red;font-size:20px;"
font-family :是字体系列
它的值有很多,比如 “宋体”,“微软雅黑”等等,就是你电脑字体库里面有的那些字体。
font-style:是字体样式
它的值有:normal(默认值)、italic(斜体)、oblique(倾斜)
color:字体颜色
font-size:字体大小
文本对齐样式:
style="text-align:center;"
text-align:文本对齐样式
值有:text-align:center; (居中对齐)
text-align:left;(左对齐)
text-align:right;(右对齐)
首行缩进2字符:text-indent:2em; (当然也可以用px 不过建议还是用em)
行高:height:300px; (指这一行的宽度)
line-height:80px;(指文字的行高)
文本装饰:
text-decoration:underline;(下划线)
text-decoration:line-through; (中划线)
text-decoration:overline;(上划线)
text-decoration:none; (取消线条)
没有下划线的链接:
<body>
<a href="//www.baidu.com/" style="text-decoration:none;">百度一下</a>
</body>