A: {<style type="text/css">p {color:red}</style>}
B: {<style type="text/css">
C: firstp {color:red}</style>}
D: {<style type="text/css">.firstp {color:red}</style>}
E: {<style type="text/css">p.firstp {color:red}</style>}
举一反三
- 在下面代码使用HTML元素的ID属性,将样式应用于网页上的某个段落:<P id=”firstp”>这是一个段落</P>下面选项中,( )正确将段落文字设置为红色。 A: <Style Type=”text/css”> P {color:red} </Style> B: <Style Type=”text/css”> C: firstp {color:red} </Style> D: <Style Type=”text/css”> .firstp {color:red} </Style> E: <Style Type=”text/css”> P.firstp {color:red} </Style>
- 下面哪个属于标签选择器( ) A: <style type=”text/css”> pa{bgcolor:red}</style> B: <style type=”text/css”> .mv{bgcolor:green}</style> C: <style type=”text/css”> D: first{bgcolor:blue}</style> E: <style type=”text/css”> div{bgcolor:red}</style>
- 以下写法属于标签选择器的是() A: <style type=”text/css”> div{font-size:12px}</style> B: <style type=”text/css”> C: div{bgcolor:black}</style> D: <style type=”text/css”> spen{width:200px}</style> E: <style type=”text/css”> .div{height:200px}</style>
- 下面代码使用HTML元素的ID属性,将样式应用于网页上的某个段落:<P id="firstp">这是第一个段落</P>下面选项中,( )正确定义了上面代码引用的样式规则。 A: <STYLE TYPE="text/css">p{color:red}</STYLE> B: <STYLE TYPE="text/css"> C: firstp{color:red}</STYLE> D: <STYLE TYPE="text/css">.firstp {color:red}</STYLE> E: <STYLE TYPE="text/css">p.firstp{color:red}</STYLE>
- 下列那种引入css的方式是错误的?( ) A: <link href=”mystyle.css” rel=”stylesheet” type=”text/css”> B: <style type=”text/css”> import “mystyle.css”; </style> C: <h1 style=”color:white”>这是一行字</h1> D: <style type=”text/css”> h1{color:white}</style>
内容
- 0
在HTML文件中应用abc.css文件中的样式的方法有( ) A: <link href="abc.css" type="text/css" rel="stylesheet"> B: <style type="text/css">@import (abc.css);</style> C: <style type="text/css">import url (abc.css);</style> D: <style type="text/css">@import url(abc.css);</style>
- 1
下面代码使用HTML元素的id属性,将样式应用于网页上的某个段落:<p id="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>
- 2
关于行内式引入CSS样式表,以下书写正确的是( ) A: <p style=font-size:12px; color:red;>段落文本</p> B: <p style="font-size:12px, color:red;">段落文本</p> C: <p style="font-size:12px; color:red;">段落文本</p> D: <p style="font:12px; color:red;">段落文本</p>
- 3
CSS样式代码如下所示,则选项( )能够实现在页面中将“文本”两个字显示为红色<style type="text/css"> #h1 { color:red; } .title { color:red; }</style>。 A: <p class="title">文本</p> B: <h1>文本</h1> C: <h1 id="title">文本</h1> D: <p name="h1">文本</p>
- 4
在HTML中,使用HTML元素的class属性,将样式应用于网页上某个段落的代码如下所示:<Pclass=“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"> E: firstp{color:red}</style>