繁体中文
设为首页
加入收藏
当前位置:网站制作首页 >> HTML教程 >> HTML 字体

HTML 字体

2007-07-15 08:00:00  作者:  来源:互联网  浏览次数:0  文字大小:【】【】【
简介:The tag in HTML is deprecated. It is supposed to be removed in a future version of HTML. 标签在HTML里是不被推荐的。在下个版本的HTML中这个标签会被移除。 Even if a lot of people are using it, you s...
关键字:字体 HTML

The tag in HTML is deprecated. It is supposed to be removed in a future version of HTML.

标签在HTML里是不被推荐的。在下个版本的HTML中这个标签会被移除。

Even if a lot of people are using it, you should try to avoid it, and use styles instead.

哪怕依然有很多人在使用它,你也应该尝试去避免使用它,而用样式来取代它。

The HTML Tag

HTML的标签

With HTML code like this, you can specify both the size and the type of the browser output :

通过下面这些代码,你可以指定字体在浏览器显示的大小和风格:

This is a paragraph.

This is another paragraph.

Try it yourself

你自己尝试下吧!

Font Attributes

字体属性

Attribute

属性

Example

例子

Purpose

目的

size="number"

size="2"

Defines the font size

定义字体大小

size="+number"

size="+1"

Increases the font size

增加字体大小

size="-number"

size="-1"

Decreases the font size

减小字体大小

face="face-name"

face="Times"

Defines the font-name

定义字体名称

color="color-value"

color="#eeff00"

Defines the font color

定义字体颜色值

color="color-name"

color="red"

Defines the font color

定义字体颜色名称

The Tag Should NOT be Used

不应该使用的标签

The tag is deprecated in the latest versions of HTML (HTML 4 and XHTML).

在最新的HTML版本中(HTML4和XHTML)标签是不被推荐的

The World Wide Web Consortium (W3C) has removed the tag from its recommendations. In future versions of HTML, style sheets (CSS) will be used to define the layout and display properties of HTML elements.

W3C组织已经将标签从它的推荐中删除,将来版本的HTML,样式表(css)将会被使用来定义布局以及显示HTML各元素的属性。

The Right Way to Do It - With Styles

使用正确的方法来做-使用样式

Set the font of text

设置文字的字体

This example demonstrates how to set the font of a text.

这个案例展示了如何设置文本中的字体属性。

Set the font size of text

设置文字的大小

This example demonstrates how to set the font size of a text.

这个案例展示了如何设置文本中的字体大小。

Set the font color of text

设置文字的颜色

This example demonstrates how to set the color of a text.

这个案例展示了如何设置文本中的字体颜色。

Set the font, font size, and font color of text

设置文字的大小、字体、颜色

This example demonstrates how to set the font, font size, and font color of a text.

这个案例展示了如何设置文本中的字体、字体大小以及字体颜色。

Where to Learn More About Style Sheets?

到哪里去学习更多的样式表?

First off: Finish the last chapters in our HTML tutorial !!! In the following chapters we will explain why some tags, like , are to be removed from the HTML recommendations, and how to insert a style sheet in an HTML document.

首先: 完成我们HTML教程的最后几章!!在接下来的章节我们会解释为什么一些标签,像,会从推荐中删除还有就是怎样在一个HTML文档中插入一个样式表。

To learn more about style sheets: Study our CSS Tutorial.

学习有关样式表的知识可以进入我们的CSS教程

责任编辑:admin
相关文章