Cbse, class 8, IT, Computer : Ch.4 CSS in HTML Notes

Cbse, class 8, IT, Computer : Ch.4 CSS in HTML Notes

 1.What is CSS?

a) CSS is a style sheet language

b) CSS is designed to separate the presentation and content, including layout,

colors, and fonts

c) CSS is the language used to style the HTML documents

d) All of the mentioned


2. Which of the following tag is used to embed css in html page?

a) <css>

b) <!DOCTYPE html>

c) <script>

d) <style>


3. Which of the following CSS selectors are used to specify a group of

elements?

a) tag

b) id

c) class

d) both class and tag


4. Which of the following has introduced text, list, box, margin, border, color,

and background properties?

a) HTML

b) PHP

c) CSS

d) Ajax


5. Which of the following CSS selector is used to specify a rule to bind a

particular unique element?

a) tag

b) id

c) class

d) both class and tag


6. Which of the following type of HTML tag is used to define an internal style

sheet?

a) <script>

b) <link>

c) <class>

d) <style>


7. Which of the following CSS property is used to make the text bold?

a) text-decoration: bold

b) font-weight: bold

c) font-style: bold

d) text-align: bold


8. What will be the output of following CSS code snippet?

h1 {color: "green";}

a) nothings happen

b) error occurs

c) heading becomes dark-green

d) heading becomes green


9. Which of the following CSS style property is used to specify an italic text?

a) style

b) font

c) font-style

d) @font-face


10. What will be the output of following CSS code snippet?

h1 {color: red text-decoration: underline; font-style: italic;}

a) color: red, text-decoration: underline works

b) only font-style: italic works

c) color: red, text-decoration: underline and font-style: italic all works

d) text-decoration: underline and font-style: italic works


11. Which of the following is the correct syntax to link an external style sheet

in the HTML file?

a) <link rel=”stylesheet” href=”style.css” />

b) <link rel=”stylesheet” src=”style.css” />

c) <style rel=”stylesheet” src=”style.css” />

d) <style rel=”stylesheet” link=”style.css” />


12. Which of the following property is used as the shorthand property for the

padding properties?

a) padding-left

b) padding-right

c) padding

d) All of the above


13. How can we change the text color of an element?

a) Background-color

b) color

c) both of above

d) none of the above


14.In how many ways can CSS be written in?

a) 1

b) 2

c) 3

d) 4


15. How can we select an element with a specific ID in CSS?

a) $

b) #

c) .

d) @


Comments

Popular posts from this blog