当前位置:文档之家› XHTML+CSS考试试题答案

XHTML+CSS考试试题答案

XHTML+CSS考试题
姓名:批次:分数:
一.选择
1. 表示放在每个定义术语词之前的XHTML代码是( A )
A. <dl></dl>
B. <dt></dt>
C. <dd></dd>
D. <ol></ol>
2. 如何在新窗口中打开链接?( D )
A. <a href=”#” new>
B. <a href=”#” target=”_blank”>
C. <a href=”#” target=”_self”></a>
D. <a href=”#” target=”_blank”></a>
3. <frameset rows=#>是用来指定什么的?C
A. 混合分框
B. 纵向分框
C. 横向分框
D. 任意分框
4. 框架中“不可改变大小”的语法是下列哪一项( B )
A. <img src="URL" border=?>
B. <center></center>
C. <address></address>
D. <frame noresize>
5. 下列哪个样式定义后,内联(非块状)元素可以定义宽度和高度( A )
A.display:inline
B.display:none
C. display:block
D. display:inherit
6. 不换行必须设置( A )
A.word-break
B.letter-spacing
C.white-space
D.word-spacing
7. 选出你认为最合理的定义标题的方法( C )
A.<span class="heading">文章标题</span>
B.<p><b>文章标题</b></p>
C. <h1>文章标题</h1>
D. <strong>文章标题</strong>
二.简答
1. 如何由页面底部快速跳到页面的顶部?插下锚标签
2. 如何给文字连接加上文字提示?alt=””
3. 如何让所有页面共享同一个层叠样式表(CSS)?<link href=””>
4. 如何让所有链接在框架的同一指定窗口打开?
5. 图片加链接后有浏览器默认的边框,如何消除?设置边框等于0
6. 将以下CSS代码进行缩写,注意要符合缩写的规范。

a) 代码一:
border-width:1px;
border-color:#000;
border-style:solid;
border:1px solid #000
b) 代码二:
background-position:0 0;
background-repeat:no-repeat;
background-attachment:fixed;
background-color:#f00;
background-image:url(background.gif);
Background:#foo url(background.gif) no-repeat fixed 0 0
c) 代码三:
font-style:italic;
font-family:"Lucida Grande",sans-serif;
font-size:1em;
font-weight:bold;
font-variant:small-caps;
line-height:140%;
Font:italic small-caps bold 1em/140% “Lucida Grande“,sans-serif d) 代码四:
list-style-position:inside;
list-style-type:square;
list-style-image:url(image.gif);
List-style:square inside url(image.gif)
e) 代码五:
margin-left:20px;
margin-right:20px;
margin-bottom:5px;
margin-top:20px;
margin:20px 20px 5px 20px;
f)代码六:
color:#336699;
color:#ffcc00;
color:#369;
color:#fc0
7.使用重构的方式制作出一个如下图的水平、垂直都居中短边为50px,长边为150px的红色十字架。

要求:
1.使用2个div完成
2.使用3个div完成
3.使用5个div完成
8.用DIV+CSS制作出以下模型。

相关主题