This set of CSS Multiple Choice Questions & Answers (MCQs) focuses on “Appearance of Form Elements”.
1. Which property is used to add space inside the text field?
a) padding
b) margin
c) number
d) password
View Answer
Explanation: Padding property is used to add space inside the text field, when we have many inputs after each other we can also add some margin to add more space outside,
input[type=text] {padding:13px 30px; margin: 8px 0;}
2. Which one can animate the width of search input when get focus?
a) focus
b) transition
c) outline
d) color
View Answer
Explanation: For animating the width of search input when it gets focus we used CSS transition property,
input[type=text] {-webkit-transition: width 09s ease-in-out; transition: width 0.9s ease-in-out; } input[type=text]:focus {width:100%;}
3. Which of the following will insert generated content in the counter?
a) content
b) counter-reset
c) counter-increment
d) counter()
View Answer
Explanation: content inserts generated content, counter-reset creates or resets a counter, counter-increment increments the value of the counter, counter() function adds the value of a counter to an element.
4. Which of the following is not the pseudo class for CSS Basic UI Level3?
a) :optional
b) :read-only
c) :valid
d) :checked
View Answer
Explanation: CSS Basic UI Level 3 has many pseudo-classes like :widget, :invalid, :valid, :in-range, :required, :read-write, :read-only, :optional, :out-of-range. CSS Selector Level 3 has the classes :disabled, :enabled, :indeterminate, :checked.
5. Which is not a Mozilla CSS Extension?
a) ::-webkit-input-placeholder
b) :-moz-placeholder
c) –moz-ui-valid
d) :-moz-submit-invalid
View Answer
Explanation: Mozilla CSS Extensions include :-moz-placeholder, :-moz-ui-invalid, :moz-ui-valid, :moz-submit-invalid. ::-webkit-input-placeholder is Webkit CSS Extension, :-ms-input-placeholder is Microsoft CSS Extension.
6. Which of the following is an extension to the common JavaScript framework?
a) Niceforms
b) Uni-forms
c) Formalize
d) jQuery UI
View Answer
Explanation: Formalize is an extension to common JavaScript frameworks like JQuery, Dojo, YUI etc., it helps to normalize and customize the forms. Uni-form standardizes form markup, styling it with CSS, it also offers a few additional features when used with jQuery.
7. Which of the following will provide date pickers?
a) jQuery UI
b) Niceforms
c) WebShim
d) Twitter Bootstrap
View Answer
Explanation: jQuery UI offers some very interesting and advanced as well as customizable widgets like date pickers with special attention given to accessibility. Niceforms is a standalone JavaScript method that provides complete customization of web forms.
8. Which of the following helps to deal with HTML5 support?
a) Twitter Bootstrap
b) WebShim
c) jQuery UI
d) Niceforms
View Answer
Explanation: WebShim is a big tool that can help with browser HTML5 support, web form part can be very helpful. If you want to normalize forms Twitter Bootstrap can greatly help.
9. Which is not a WebKit value?
a) push-button
b) menulist
c) radio
d) tooltip
View Answer
Explanation: WebKit includes various values like checkbox, button, button-level, menulist, scrollbarbutton-up, listitem, scrollbarbutton-left, caret, textfield, textarea, searchfield, searchfield-decoration, slider-vertical, slider-horizontal, scrollbargripper-horizontal etc.
10. Which is not a Mozilla value?
a) caret
b) resizer
c) listbox
d) scrollbar
View Answer
Explanation: Mozilla includes many values like menulist, radio, scrollbar, dialog, listbox, scrollbarbutton-down, scrollbar, resizer, checkbox, scrollbarbutton-up, separator, toolbar, toolbox, statusbar, separator, toolbarbutton, window, treetwisty, treeview etc.
11. Which is not the property of CSS box model?
a) width
b) height
c) margin
d) color
View Answer
Explanation: CSS box model include height, width, padding, margin and border. All text-fields have complete support for every property related to CSS box model. Browser relies on system default styles when displaying these widgets.
Sanfoundry Global Education & Learning Series – CSS.
To practice all areas of CSS, here is complete set of 1000+ Multiple Choice Questions and Answers.
- Practice HTML MCQ
- Check CSS Books
- Practice Information Science MCQs
- Practice MCA MCQs
- Practice Computer Science MCQs