试题详情
单项选择题在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>

  • C
  • 关注下方微信公众号,在线模考后查看

热门试题