在CSS中,设置h2标记字号为16px且显示红色字体的代码?

html-css012

在CSS中,设置h2标记字号为16px且显示红色字体的代码?,第1张

h2

font-size:16px

color:red

document.writeln("<style type=\"text\/css\">")

document.writeln("<!--")

document.writeln(" border-top-width: 1px")

document.writeln(" border-left-color: #FF0000")

document.writeln("}")

document.writeln("<table width=\"100%\" height=\"24\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" background=\"\/images\/topbg.gif\" class=\"topbg\">")

document.writeln("href=\".\/Firefox\/index.html\" style='color:red'")

document.writeln(">系统发现您的浏览器存在安全漏洞、强烈推荐您使用 最安全 的浏 览器: FireFox火狐浏览器2.0,从此远离木马,病毒!<\/A><\/div>")

document.writeln("<\/table>")

编程工具

记事本:使用Windows系统自带的记事本可以编辑网页。只需要在保存文档时,以.html为后缀名进行保存即可。

Dreamweaver:它与Flash、Fireworks并称网页三剑客。Dreamweaver是集网页制作和管理网站于一身的所见即所得网页编辑器,它是第一套针对专业网页设计师特别开发的视觉化网页开发工具,利用它可以轻而易举地制作出充满动感的网页。

每个200宽度,高度30,垂直居中,加粗,字号16px,代码如下:

<div style="float:leftwidth:200pxheight:30pxline-height:30pxfont-size:16pxfont-weight:700">时尚</div>

<div style="float:leftwidth:200pxheight:30pxline-height:30pxfont-size:16pxfont-weight:700">美食</div>

<div style="float:leftwidth:200pxheight:30pxline-height:30pxfont-size:16pxfont-weight:700">新闻</div>

第一种:.pt{font-size:24pt}

第二种:

<p style="font-size:xx-small">关键字为xx-small。</p>

<p style="font-size:x-small">关键字为x-small。</p>

<p style="font-size:smaller">关键字为smaller。表示相对尺寸。</p>

<p style="font-size:small">关键字为small。</p>

<p style="font-size:medium">关键字为medium。这是浏览器默认的字号。</p>

<p style="font-size:large">关键字为large。</p>

<p style="font-size:larger">关键字为larger。表示相对尺寸。</p>

<p style="font-size:x-large">关键字为x-large。</p>

<p style="font-size:xx-large">关键字为xx-large。</p>