Assignment #1
1. We enclose HTML tags within?
a) {}
b) ()
c) []
d) None of the above
2. Which of the following tags doesn’t require a closing tag?
a) br
b) hr
c) Both a and b
d) None of the above
3. For what does the abbreviation HTML stand?
a) Hypertext Markup language.
b) HighText Markup language.
c) HyperText markdown Language.
d) None of the above.
4. What is the effect of the <b> tag?
a) It converts the text within it to bold font.
b) It is used to write black-colored font.
c) It is used to change the font size.
d) None of the above
5. Which attribute is used to provide a unique name to an HTML element?
a) id
b) class
c) type
d) None of the above
6. For what does the abbreviation CSS stand for?
a) Cascading Style Sheet
b) Colored Special Sheets
c) Color and Style Sheets
d) Colored Style Sheets
7. How can we change the background color of an element?
a) background-color
b) color
c) Both a and b
d) None of the above
8. How can We change the text color of an element?
a) background-color
b) color
c) Both a and b
d) None of the above
9. How many ways can CSS be written in?
a) 1
b) 2
c) 3
d) 4
10. What type of CSS is the following code snippet?
<h1 style="color:blue;">A Blue Heading</h1>
a) Inline
b) Internal (Document level)
c) External
d) None of the above
11. What type of CSS is generally recommended for designing large web pages?
a) Inline
b) Internal (Document level)
c) External
d) None of the above
12. How can we select an element with a specific id in CSS?
a) #
b) .
c) ^
d) >
13. How can we select an element with a specific class in CSS?
a) #
b) .
c) ^
d) >
14. Which of the following is the correct way to select all h1 headers
a) .h1
b) h1
c) #h1
d) None of the above
15. Which of the following is the correct way to apply specific style when the cursor is over
the link?
a) a:link
b) a:visited
c) a:cursor
d) a:over
16. How to select all elements of html document?
a) !
b) #
c) .
d) *
17. The CSS property used to control the element's font-size is
a) text-style
b) text-size
c) font-size
d) None of the above
18. Which of the following is the correct syntax to make the background-color of all
paragraph elements to yellow?
a) p {background-color : yellow;}
b) p {background-color : #yellow;}
c) all {background-color : yellow;}
d) all p {background-color : #yellow;}
19. Which character is used to represent the closing of a tag in HTML?
a) \
b) !
c) /
d) .
20. How to create a hyperlink in HTML?
a) <a href = "www.javatpoint.com"> javaTpoint.com </a>
b) <a url = "www.javatpoint.com" javaTpoint.com /a>
c) <a link = "www.javatpoint.com"> javaTpoint.com </a>
d) <a> www.javatpoint.com <javaTpoint.com /a>