1) Which of the following ranks the selectors from highest precedence to lowest precedence? a) Select by tag name, select by class name, select by id name b) Select by id name, select by tag name, select by class name c) Select by id name, select by class name, select by tag name d) Select by class name, select by id name, select by tag name 2) Why do we use CSS? a) HTML wasn’t intended to be able to style web pages, CSS allows us to add style b) Separate the content of a web page from the design of a web page c) Easily modify the look and feel of a web site even at a large scale d) All of the above 3) Which of the following code snippets will select all <img> tags on a page and give them a height of 200 pixels? a) img {height: 200px;} b) tag="img" {height: 200px;} c) <img style="height:200px;"> d) <img> {height: 200px;} 4) Which of the following code snippets will select all HTML elements with the class “alert” and set their color to be red? a) alert {color: red;} b) .alert {color: red;} c) #alert {color: red;} d) class="alert" {color: red;} 5) Which of the following CSS rules will select the HTML element with the id logo and set the font size for that element to 60 pixels? a) logo {font-size: 60px;} b) .logo {font-size: 60px;} c) #logo {font-size: 60px;} d) id="logo" {font-size: 60px;} 6) What font color will the following HTML element have after being styled by the given CSS: <h1 class="fire">Welcome!</h1><h1 class="fire">Welcome!</h1> a) red b) green c) blue d) black 7) Which of the following statements are true about styling your web pages with CSS:  I. Styling with CSS is more scalable than using style= on each HTML tag that you want to style II. You can create styles with CSS that are not possible using style= on an HTML tag a) II only b) I and II c) I only d) Neither I nor II 8) What is CSS a) Connection Service Site b) Conductive Sports Site c) Collective Specific Service d) Cascading Style Sheets 9) What property is used to change the text color of an element? a) fontcolor: b) textcolor: c) color: d) font-color: 10) The # symbol specifies that the selector is? a) class b) tag c) first d) id 11) How do you make a list not display bullet points? a) list-style-type: no-bullet b) list: none c) bulletpoints: none d) list-style-type: none 12) Which HTML attribute is used to define inline CSS styles? a) CSS b) Style c) ID d) Type 13) What is the correct CSS syntax for making all the <p> tags font size 14px? a) p {14px} b) p {font-size: 14px;} c) p {text-size: 14px;} d) p {font: 14px;}

排行榜

视觉风格

选项

切换模板

恢复自动保存: