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>
举一反三
- 在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>
- 下面哪个属于标签选择器( ) 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>
- 如果网页中出现乱码,我们一般使用()来解决。 A: <meta charset="utf-8" /> B: <style type="text/css"></style> C: <script></script> D: <link type="text/css" rel="stylesheet" href="css/index.css">
- {下面代码使用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>}
内容
- 0
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>
- 1
有一样式表文档sheet1.css,现要将该样式表文档中定义的样式应用到当前页面中,下列方法正确的是( )。 A: 将下列代码插入文档的<HEAD>部分中: <style type = "text/css">@import url('sheet1.css')</style> B: 将下列代码插入文档的<HEAD>部分中: <link rel="stylesheet" type="text/css" href="sheet1.css"> C: 将下列代码插入文档的<HEAD>部分中: <style type = "text/css"> <link rel="stylesheet" type="text/css" href="sheet1.css"> </style> D: 在每个要使用sheet1.css样式的元素的style属性中引用该样式表文档
- 2
已经定义好了一个外部样式表文件c.css,要在网页中链接此外部样式表, 正确的做法是() A: <html><head><style><link type=”text/css” rel=”c.css”></style></head></html> B: <html><head><style><link type=”text/css” href=“stylesheet”></style></head></html> C: <html><head><link type=”text/css” rel=“stylesheet”href=”c.css”></head></html> D: <html><head><link type=”text/css” rel=“stylesheet”></head></html>
- 3
正确的内部样式表格式 A: <style type="text/css">/*选择符{属性:属性值...}*/</style> B: /*选择符{属性:属性值...}*/ C: 选择符{属性:属性值...} D: <style type="text/css">选择符{属性:属性值...}</style>
- 4
有一样式表文档sheet1.css,现要将该样式表文档中定义的样式应用到当前页面中,下列方法正确的是()(选择两项)。 A: 将下列代码插入文档的<HEAD>部分中:<style type = "text/css">@import url('sheet1.css')</style> B: 将下列代码插入文档的<HEAD>部分中:<link rel="stylesheet" type="text/css" href="sheet1.css"> C: 将下列代码插入文档的<HEAD>部分中:<style type = "text/css"><link rel="stylesheet" type="text/css" href="sheet1.css"></style> D: 在每个要使用sheet1.css样式的元素的style属性中引用该样式表文档