单项选择题
在HTML中,使用HTML元素的class属性,将样式应用于网页上某个段落的代码如下所示:< P class=“firstp”>这是一个段落< /P> 下面选项中,()正确定义了上面代码引用的样式规则。
A、<style type="text/css">P{color:red}</style>
B、<style type="text/css">#firstp {color:red} </style>
C、<style type="text/css"> .firstp{color:red} </style>
D、<style type="text/css">P.firstp{color:red}</style>
相关考题
-
单项选择题
在HTML中,以下关于CSS样式中文本属性的说法,错误的是()
A.font-size用于设置文本的字体大小
B.font-family用与设置文本的字体类型
C.color用与设置文本的颜色
D.text-align用与设置文本的字体形状 -
单项选择题
在网页编程中,某站点下有一个名为index.htm的页面和一个名为a.css的样式表文件(index.htm和a.css在同一个目录下),如果要在index.htm页面中应用a.css样式表文件中的样式表,则应在index.htm页面的标签中添加以下哪段代码()
A、<link type="text/css" rel="stylesheet" file="a.css">
B、<a type="text/css" rel="stylesheet" href="a.css">
C、<link type="text/css" rel="stylesheet" href="a.css">
D、<link type="text/css" rel="stylesheet" src="a.css"> -
单项选择题
想要使用户在单击超链接时,弹出一个新的网页窗口,下面()选项符合要求。
A、<A href="right.html" target="_blank">新闻</A>
B、<A href="right.html" target="_parent">新闻</A>
C、<A href="right.html" target="_top">新闻</A>
D、<A href="right.html" target="_self">新闻</A>
