HTML的样式包含:
1,标签{style ,link}
2。属性{rel="styleSheet"外部样式表,type="text/css",margin-left:边距}
外部样式的插入方法:当中myStyle.css是你自定义的css文件,里面能够写上你要定义的内容css:{
h1{//标题h1的颜色color: red; }}
<link rel="stylesheet" type="text/css" href="myStyle.css">内部样式表:
<style type="text/css">p{color: cyan;} </style> 内联样式表
<a style="color: blue" href="http://blog.csdn.net/darongzi1314/article/details/47088151" target="_blank">点击我跳转到我的博客</a>以下是详细的使用方法:
<!DOCTYPE html> <html> <head lang="en"><meta charset="UTF-8"><title>样式</title><link rel="stylesheet" type="text/css" href="myStyle.css"><style type="text/css">p{color: cyan;}</style> </head> <body><h1>标题h1</h1><p>欢迎来学习HTML5</p><a style="color: blue" href="http://blog.csdn.net/darongzi1314/article/details/47088151" target="_blank">点击我跳转到我的博客</a> </body> </html>