CSS 测验
来源:http://www.w3school.com.cn
1 . CSS 指的是?
? Computer Style Sheets
? Cascading Style Sheets
? Creative Style Sheets
? Colorful Style Sheets
2 . 在以下的 HTML 中,哪个是正确引用外部样式表的方法?
? <style src="mystyle.css">
? <link rel="stylesheet" type="text/css" href="mystyle.css">
? <stylesheet>mystyle.css</stylesheet>
3 . 在 HTML 文档中,引用外部样式表的正确位置是?
? 文档的末尾
? 文档的顶部
? <body> 部分
? <head> 部分
4 . 哪个 HTML 标签用于定义内部样式表?
? <style>
? <script>
? <css>
5 . 哪个 HTML 属性可用来定义内联样式?
? font
? class
? styles
? style
6 . 下列哪个选项的 CSS 语法是正确的?
? body:color=black
? {body:color=black(body}
? body {color: black}
? {body;color:black}
7 . 如何在 CSS 文件中插入注释?
? // this is a comment
? // this is a comment //
? /* this is a comment */
? ' this is a comment
8 . 哪个属性可用于改变背景颜色?
? bgcolor:
? background-color:
? color:
9 . 如何为所有的 <h1> 元素添加背景颜色?
? h1.all {background-color:#FFFFFF}
? h1 {background-color:#FFFFFF}
? all.h1 {background-color:#FFFFFF}
10 . 如何改变某个元素的文本颜色?
? text-color:
? fgcolor:
? color:
? text-color=
11 . 哪个 CSS 属性可控制文本的尺寸?
? font-size
? text-style
? font-style
? text-size
12 . 在以下的 CSS 中,可使所有 <p> 元素变为粗体的正确语法是?
? <p style="font-size:bold">
? <p style="text-size:bold">
? p {font-weight:bold}
? p {text-size:bold}
13 . 如何显示没有下划线的超链接?
? a {text-decoration:none}
? a {text-decoration:no underline}
? a {underline:none}
? a {decoration:no underline}
14 . 如何使文本以大写字母开头?
? text-transform:capitalize
? 无法通过 CSS 来实现
? text-transform:uppercase
15 . 如何改变元素的字体?
? font=
? f:
? font-family:
16 . 如何使文本变为粗体?
? font:b
? font-weight:bold
? style:bold
17 . 如何显示这样一个边框:上边框 10 像素、下边框 5 像素、左边框 20 像素、右边框 1 像素?
? border-width:10px 5px 20px 1px
? border-width:10px 20px 5px 1px
? border-width:5px 20px 10px 1px
? border-width:10px 1px 5px 20px
18 . 如何改变元素的左边距?
? text-indent:
? indent:
? margin:
? margin-left:
19 . 请判断以下说法是否正确:如需定义元素内容与边框间的空间,可使用 padding 属性,并可使用负值?
? 错误
? 正确
20 . 如何产生带有正方形项目的列表?
? list-type: square
? type: 2
? type: square
? list-style-type: square