第一章 单元测试

1、单选题:
CSS是( )的缩写。
选项:
A:ComputerStyleSheets
B:CreativeStyleSheets
C:CascadingStyleSheets
D:ColorfulStyleSheets
答案: 【CascadingStyleSheets

2、单选题:
引用外部样式表的格式是()。
选项:
A:<stylesheet>mystyle.css</stylesheet>
B:<link rel="stylesheet" type="text/css" href="mystyle.css">
C:<style src="mystyle.css">
D:<stylesheet>mystyle</stylesheet>
答案: 【<link rel="stylesheet" type="text/css" href="mystyle.css">

3、单选题:
引用外部样式表的元素应该放在 ( )。
选项:
A:在head元素中
B:在body元素中
C:HTML文档的结束的位置
D:HTML文档的开始的位置
答案: 【在head元素中

4、单选题:
内部样式表的元素是( )。
选项:
A:<css>
B:<script>
C:<body>
D:<style>
答案: 【<style>

5、单选题:
元素中定义样式表的属性名是( )。
选项:
A:style
B:font
C:class
D:styles
答案: 【style

6、多选题:
下列选择器中正确的有( )。
选项:
A:.test{color:red;}
B:#test{color:red;}
C:p{color:red;}
D:$test{color:red;}
答案: 【.test{color:red;};
#test{color:red;};
p{color:red;}

7、多选题:
关于CSS基本语法说法正确的是( )。
选项:
A:当有多个属性时,用“;”进行区分
B:属性必须要包含在号之中
C:属性和属性值之间用等号链接
D:如果一个属性有几个值,则每个属性值之间用分号分隔开
答案: 【当有多个属性时,用“;”进行区分;
属性必须要包含在号之中

8、判断题:
CSS是Cascading Style Sheet的英文缩写。
选项:
A:错
B:对
答案: 【

9、判断题:
CSS样式代码只能放在单独的文本文件中,不能写在HTML文件中。
选项:
A:错
B:对
答案: 【

10、判断题:
CSS中id选择器和类别选择器一样,两者没有区别。
选项:
A:对
B:错
答案: 【

第二章 单元测试

1、单选题:
下列( )不属于CSS文本属性。
选项:
A:text-transform
B:line-height
C:text-align
D:font-size
答案: 【line-height

2、单选题:
下列哪一项是CSS正确的语法构成( ).
选项:
A:{body;color:black}
B:body{color:black}
C:body:color=black
D:{body:color=black}
答案: 【body{color:black}

3、单选题:
下列哪个CSS属性可以更改样式表的字体颜色( ).
选项:
A:fgcolor:
B:text-color=
C:color:
D:text-color:
答案: 【color:

4、单选题:
下列哪个CSS属性可以更改字体大小( ).
选项:
A:text-style
B:font-size
C:text-size
D:font-style
答案: 【font-size

5、单选题:
下列哪段代码能够定义所有P标签内文字加粗( ).
选项:
A:p{ font-weight:bold; }
B:< p style=”font-size:blod”>
C:p{ text-size:bold; }
D:<p style=”text-size:blod”>
答案: 【p{ font-weight:bold; }

6、单选题:
下面哪个方法可以去掉文本超链接的下划线( ).
选项:
A:a{ underline:none; }
B:a{ text-decoration:none; }
C:a{ text-decoration:no underline; }
D:a{ decoration:no underline; }
答案: 【a{ text-decoration:none; }

7、多选题:
以下声明可将文本字体加粗的有:( )。
选项:
A:font-weight:normal
B:font-weight:lighter
C:font-weight:700
D:font-weight:bold
答案: 【font-weight:700;
font-weight:bold

8、多选题:
以下装饰线设置正确的有:( ).
选项:
A:text-decoration:underline;
B:text-decoration:underline overline;
C:text-decoration:overline;
D:text-decoration:line-through;
答案: 【text-decoration:underline;;
text-decoration:underline overline;;
text-decoration:overline;;
text-decoration:line-through;

9、判断题:
在网页中用CSS设置页面字体类型,只能设置一种字体类型。
选项:
A:错
B:对
答案: 【

10、判断题:
可以使用CSS中的Word-spacing属性给中文词组设置词间距。
选项:
A:对
B:错
答案: 【

发表评论

电子邮件地址不会被公开。 必填项已用*标注