Chủ Nhật, 10 tháng 6, 2012

Trắc nghiệm kiến thức cơ bản CSS

Xin mời các bạn test một số kiến thức cơ bản về CSS. Có 26 câu hỏi, mỗi câu chỉ có một đáp án đúng, với mỗi đáp án các bạn chọn hãy giải thích cho sự lựa chọn của mình xem vì sao lại là đáp đó mà không phải đáp án kia ha.

1) What does CSS stand for?

a) Creative Style Sheets
b) Computer Style Sheets
c) Cascading Style Sheets
d) Cascade Style Sheets
e) Colorful Style Sheets

2) Where in an HTML document is the correct place to refer to an external style sheet?

a) In the <body> section
b) At the end of the document
c) At the top of the document
d) In the <head> section
e) Between head and body

3) Which HTML tag is used to define an internal style sheet?

a) css
b) text/style
c) style
d) script

4) Which HTML attribute is used to define inline styles?

a) font
b) styles
c) css
d) text
e) style

5) Which is the correct CSS syntax?

a) body {color: black}
b) body:color=black
c) {body:color=black(body}
d) {body;color:black}

6) How do you insert a comment in a CSS file?

a) /* this is a comment */
b) ' this is a comment
c) // this is a comment //
d) // this is a comment

7) Which property is used to change the background color?

a) bgcolor:
b) background-color:
c) color:

8) How do you add a background color for all "<h1>" elements?

a) all.h1 {background-color:#FFFFFF}
b) h1.all {background-color:#FFFFFF}
c) h1 {background-color:#FFFFFF}

9) How do you change the text color of an element?

a) text-color:
b) color:
c) text-color=
d) font-color:

10) Which CSS property controls the text size?

a) font-style
b) text-style
c) font-size
d) text-size

11) What is the correct CSS syntax for making all the <p> elements bold?

a) p {text-size:bold}
b) p {font-weight:bold}
c) style:bold
d) p{font:bold}

12) How do you display hyperlinks without an underline?

a) a {decoration:no underline}
b) a {text-decoration:no underline}
c) a {underline:none}
d) a {text-decoration:none}

13) How do you make each word in a text start with a capital letter?

a) text-transform:uppercase
b) text-transform:capitalize
c) You can't do that with CSS

14) How do you change the font of an element?

a) fon-face:
b) font-family:
c) f:
d) font-style:

15) How do you make the text bold?

a) font:b
b) style:bold
c) font-weight:bold

16) How do you display a border like this: 
The top border = 10 pixels, 
The bottom border = 5 pixels,
The left border = 20 pixels,
The right border = 1pixel?

a) border-width:10px 20px 5px 1px
b) border-width:10px 1px 5px 20px
c) border-width:10px 5px 20px 1px
d) border-width:5px 20px 10px 1px

17) How do you change the left margin of an element?

a) padding:
b) indent:
c) margin:
d) text-indent:
e) margin-left:

18) To define the space between the element's border and content, you use the padding property, but are you allowed to use negative values?

a) Yes
b) No

19) How do you make a list that lists its items with squares?

a) type: square
b) list-style-type: square
c) list-type: square
d) style-list: square

20) What is the correct HTML for referring to an external style sheet?

a) <link rel="stylesheet" type="text/css" href="mainstyle.css">
b) <style src="mainstyle.css">
c) <stylesheet>mainstyle.css</stylesheet>
d) <link url="stylesheet" type="text/css" href="mainstyle.css">

21) Which HTML tag is used to define an internal style sheet?

a) <script>
b) <css>
c) <stylesheet>
d) <style>

22) Which HTML attribute is used to define inline styles?

a) styles
b) class
c) font
d) style

23) What is the correct CSS syntax for making all the <p> elements bold?

a) p {font-weight:bold}
b) p {text-size:bold}
c) <p style="text-size:bold">
d) <p style="font-size:bold">

24) How do you make each word in a text start with a capital letter?

a) text-transform:capitalize
b) ext-transform:uppercase
c) You can't do that with CSS

25) How do you change the left margin of an element?

a) left-margin:
b) margin:
c) margin-left:
d) text-indent:

26) What are the three methods for using style sheets with a web page

a) Dreamweaver, GoLive or FrontPage
b) Inline, embedded or document level and external
c) Handcoded, Generated or WYSIWYG

Editor: Dương Tạ Kim Linh (Baomathethong.blogspot.com)
Author & Source: N/A

Không có nhận xét nào:

Đăng nhận xét