频道栏目
首页 > 资讯 > HTML实例/测验/总结 > 正文

HTML 样式

16-01-29        来源:[db:作者]  
收藏   我要投稿
HTML Style 元素
源代码

 
 

Look! Styles and colors

Manipulate Text
Colors Boxes
and more...

 

运行结果
背景色样式
源代码

This is a heading

This is a paragraph.

 

运行结果
字体样式,颜色,大小
源代码

A heading

A paragraph.

 

运行结果
文本对齐样式
源代码

Center-aligned heading

This is a paragraph.

 

运行结果
设置文本字体
源代码

This is a heading

This is a paragraph.

 

运行结果
设置文本字体大小
源代码

This is a heading

This is a paragraph.

 

运行结果
设置文本字体颜色
源代码

This is a heading

This is a paragraph.

 

运行结果
设置文本字体,字体大小,字体颜色
源代码

This is a paragraph with some text in it. This is a paragraph with some text in it. This is a paragraph with some text in it. This is a paragraph with some text in it.

 

运行结果
HTML使用不同样式
源代码

This is a heading

This is a paragraph.

 

运行结果
没有下划线的链接
源代码
运行结果
链接到一个外部样式表
源代码

I am formatted with an external style sheet

Me too!

 

运行结果
实例解析

HTML 样式- CSS


CSS (Cascading Style Sheets) 用于渲染HTML元素标签的样式.

 
 

Look! Styles and colors

Manipulate Text
Colors,  Boxes
and more...



如何使用CSS

CSS 是在 HTML 4 开始使用的,是为了更好的渲染HTML元素而引入的.

CSS 可以通过以下方式添加到HTML中:

  • 内联样式- 在HTML元素中使用"style" 属性
  • 内部样式表 -在HTML文档头部
区域使用


外部样式表

当样式需要被应用到很多页面的时候,外部样式表将是理想的选择。使用外部样式表,你就可以通过更改一个文件来改变整个站点的外观。

 




HTML 样式标签

标签 描述
相关TAG标签
上一篇:一键U盘装系统_怎么用U盘装系统-U盘装xp系统、win7系统教程-一键U盘启动盘制作工具教程
下一篇:一键还原系统_Win7慎用Comodo时光机一键还原系统
相关文章
图文推荐

关于我们 | 联系我们 | 广告服务 | 投资合作 | 版权申明 | 在线帮助 | 网站地图 | 作品发布 | Vip技术培训 | 举报中心

版权所有: 红黑联盟--致力于做实用的IT技术学习网站