CSS Testing Questions

Source: Internet
Author: User
1. What does CSS mean?

Your answer:
Colorful style sheets

Correct answer:
Cascading Style Sheets

 

2. In the following HTML, Which of the following is the correct method to reference an external style sheet?

Your answer:
<Style src = "mystyle.css">

Correct answer:
<LINK rel = "stylesheet" type = "text/CSS" href = "mystyle.css">

 

3. What is the correct position for referencing an external style sheet in the HTML document?

Your answer:
<Head> Part

 

4. Which HTML Tag is used to define an internal style sheet?

Your answer:
<Style>

 

5. Which HTML attribute can be used to define inline styles?

Your answer:
Style

 

6. Which of the following options has the correct CSS syntax?

Your answer:
Body {color: Black}

 

7. How do I insert comments into a CSS file?

Your answer:
// This is a comment

Correct answer:
/* This is a comment */

 

8. Which attribute can be used to change the background color?

Your answer:
Background-color:

 

9. How do I add background colors to all Your answer:
H1 {background-color: # ffffff}

 

10. How can I change the text color of an element?

Your answer:
Text-color:

Correct answer:
Color:

 

11. Which CSS attribute controls the text size?

Your answer:
Text-style

Correct answer:
Font-size

 

12. In the following CSS, the correct syntax that can change all <p> elements to bold is?

Your answer:
P {font-weight: bold}

 

13. How do I display hyperlinks without underscores?

Your answer:
A {text-Decoration: None}

 

14. How can I start the text with an uppercase letter?

Your answer:
Text-transform: Capitalize

 

15. How can I change the font of an element?

Your answer:
Font-family:

 

16. How to make the text bold?

Your answer:
Font-weight: bold

 

17. How to display a border: 10 pixels on the top border, 5 pixels on the bottom border, 20 pixels on the left border, and 1 pixel on the right border?

Your answer:
Border-width: 10px 5px 20px 1px

Correct answer:
Border-width: 10px 1px 5px 20px

 

18. How can I change the left margin of an element?

Your answer:
Text-indent:

Correct answer:
Margin-left:

 

19. Check whether the following statements are correct: To define the space between the element content and the border, you can use the padding attribute and use a negative value?

Your answer:
Correct

Correct answer:
Error

 

20. How to generate a list with a square project?

Your answer:
List-type: Square

Correct answer:
List-style-type: Square

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.