MCQ Questions On CSS1 And CSS2.1 Properties Part-2

This set of multiple choice question includes collection of top 20 MCQ questions on CSS1 and CSS2.1 properties. It includes objective questions on CSS cursor property and its values, display properties, font-weight property and orphans property of CSS. It also includes about CSS white space property, text-transform property and text-indent property.
1. A CSS cursor property value ........................... indicates the element may be a link or reference to another element or location.
A) auto
B) alias
C) cell
D) copy

2. A CSS cursor property value ................... presents an icon to indicate a cell is active, similar to what is performed in spreadsheet application.
A) auto
B) alias
C) cell
D) copy

3. A CSS cursor property value ..................... indicates that the current function is not allowed, often associated with not allowing dropping in a drag and drop action.
A) no-drop
B) no-resize
C) not-allowed
D) no-move

4. The value of display property .................... will make the item inline or block depending on the context.
A) list-item
B) run-in
C) inline-block
D) block

5. The value of display property ....................... create a block for the list box and an inline box for items.
A) list-item
B) run-in
C) inline-block
D) block

6. State whether the following statements about CSS property are True or False.
i) The default value for "empty-cells" property is hide.
ii) The default value for "float" property is none.
A) i-True, ii-True
B) i-False, ii-True
C) i-True, ii-False
D) i-False, ii-False

7. Which of the following is/are the named values of font-weight property.
i) normal   ii) bold  iii) none  iv) lighter
A) i, ii and iii only
B) ii, iii and iv only
C) i, ii and iv only
D) All i, ii, iii and iv

8. ....................... property defines the minimum number of lines of paragraph that must be left at the bottom of a page.
A) Outline
B) Orphans
C) Overflow
D) Padding

9. State whether the following statements are True or False for orphans property in CSS.
i) The default value is 2 if unspecified.
ii) Negative values may not be used in this property.
iii) It is really meaningful for print output.
A) True, True, False
B) False, True, False
C) False, True, True
D) True, True, True

10.  ................... property is similar to the align attribute available with (X)HTML block-level tags such as <P>.
A) text-align
B) text-direction
C) text-layout
D) text-indent

Read More »

MCQ Questions On CSS1 And CSS2.1 Properties Part-1

Here are the collections of 20 multiple choice questions on CSS1 and CSS2.1 properties that includes MCQ on background property and its sub properties like background-color, background-image, background-position and background-attachment. It also includes different border properties used in CSS along with CSS cursor properties and its value.    

1. Which of the following is not the background property used in CSS.
A) background-color
B) background-size
C) background-image
D) background-repeat

2. ................. property sets the background image to scroll or not to scroll with its associated element's content.
A) background-repeat
B) background-image
C) background-attachment
D) background-position

3. ...................... is the default value used in background-attachment property of CSS.
A) Fixed
B) Scroll
C) Inherit
D) None

4. Which of the following code will set the background color of h1 tag to red.
i) h1{background-color: #FF0000;}  ii) h1{background-color: #F00;}
iii) h1{background-color: red;} iv) h1{background-color: rgb(255, 0, 0);}
A) i, ii and iii only
B) ii, iii and iv only
C) i, iii and iv only
D) All i, ii, iii and iv

5. The ..................... property requires a URL to link it to the source image specified with the url() syntax.
A) background-position
B) background-repeat
C) background-attachment
D) background-image

6. The possible named values for the horizontal axis of background-position property are ...........
i) left   ii) top   iii) center   iv) right   v) bottom
A) ii, iii and iv only
B) ii, iii and v only
C) iii, iv and v only
D) i, iii and iv only

7. Which of the following are the possible named values for the vertical axis of background-position property.
A) ii, iii and iv only
B) ii, iii and v only
C) iii, iv and v only
D) i, iii and iv only

8. .......................... property determines how background images specified by the property background or background image tile when they are smaller than the canvas space used by their associated elements.
A) background-position
B) background-repeat
C) background-attachment
D) background-image

9. Which of the following is/are the possible values of background-repeat property.
i) repeat-x   ii) repeat-y   iii) none   iv) inherit
A) i, ii and iii only
B) ii, iii and iv only
C) i, ii and iv only
D) i, ii, iii and iv only

10. The default value of background-repeat property used in CSS is ...................
A) repeat-x
B) repeat-y
C) repeat
D) inherit

Read More »

Multiple Choice Questions On CSS Selectors Part-2

This set of multiple choice questions on CSS selector includes collection of objective type questions on CSS1, CSS2 and CSS3 attribute selectors, pseudo element selectors, pseudo class selectors and hexadecimal code to represent colors in CSS.

1. A CSS3 selector ......................... selects all elements of E that have the attribute attr that contains the given value.
A) E[attr$=value]
B) E[attr*=value]
C) E[attr~=value]
D) E[attr^=value]

2. .......................... sets the color to green if the name of div ends with an alphabet "S".
A) div[name$="S"] {color:green;}
B) div[name=$"S"] {color:green;}
C) div[name^="S"] {color:green;}
D) div[name#="S"] {color:green;}

3. A CSS3 selector ........................ selects all elements of E that have the attribute attr that begins with the given value.
A) E[attr$=value]
B) E[attr*=value]
C) E[attr~=value]
D) E[attr^=value]

4. .................. is the pseudo element selector used in CSS2, which sets a style to be used immediately before the element.
A) : before
B) : : before
C) : : : before
D) before

5. The ..................... pseudo-class is used primarily to change the appearance of links when the user's pointer is hovering over them.
A) : focus
B) : enable
C) : disable
D) : hover

6. The CSS rule ...................... would make the first <li> tag found within an unordered list tag (<ul>) pink.
A) ul li {color:pink;}
B) ul li:first {color:pink;}
C) ul li:first-child {color:pink;}
D) ul li:child(1) {color:pink;}

7. The CSS rule ..................... would make the fourth list item underlined if the list had a fourth item.
A) ul li: nth(4) {text-decoration:underline;}
B) ul li: nth-child(4) {text-decoration: underline;}
C) ul li: 4th-child {text-decoration: underline;}
D) ul li: nth-of-type(4) {text-decoration: underline;}

8. .................. would set the background color of first <p> tag found in <div> orange.
A) div p: nth-of-type(1) {background-color: orange;}
B) div p: first-of-child {background-color: orange;}
C) div p: first-of-tag {background-color: orange;}
D) div p: first-of-type {background-color: orange;}

9. Which of the following is/are the CSS properties used in font property type.
i) font-family  ii) font-variant  iii) color  iv) size
A) i, ii and iii only
B) ii, iii and iv only
C) i, iii and iv only
D) All i, ii, iii and iv only

10. Which of the following is/are the CSS  properties used in outlines properties type.
i) outline-color   ii) outline-style  iii) outline-width   iv) outline-size
A) i, ii and iii only
B) ii, iii and iv only
C) i, iii and iv only
D) All i, ii, iii and iv only
Read More »

Multiple Choice Questions On CSS Selectors Part-1

Here are the collections of 20 multiple choice interview questions on CSS selectors, that includes MCQ on CSS element selectors, id selectors, class selectors, contextual selectors, direct descendant selector, adjacent sibling selectors, general sibling selectors and attribute selectors.  

1. In CSS selectors, if the simplest rules can be applied to all occurrences of a particular tag, such selectors are called ..................
A) id selectors
B) element selectors
C) class selectors
D) contextual selectors

2. To set a value for all elements used in HTML document ....................... can be used.
A) # (hash)
B) * (astrik)
C) . (dot)
D) ^ (exponent)

3. Which of the following is NOT the correct way of using element selectors in CSS.
A) P{line-height:250%;}
B) #{padding:10px;}
C) *{margin:5px;}
D) h1,h2,h3{color:black;}

4. ................. select only div element with their id contribute set to "div1".
A) #div1{color: red;}
B) div.div1 {color: red;}
C) #div1 div {color: red;}
D) div#div1{color: red;}

5. Which of the following is/are the correct examples of implementing class selectors.
i) h2.new {background-color: green;} ii) *.new {background-color: green;}
iii) .new * {background-color: green;} iv) .new {background-color: green;}
A) i, ii and iii only
B) ii, iii and iv only
C) i, ii and iv only
D) i, ii, iii and iv only

6. ..................... are created by showing the order in which the tags must be nested for the rule to be applied.
A) id selectors
B) element selectors
C) class selectors
D) contextual selectors

7. Which of the following rule indicates all occurrences of the span element within a div element have a pink background.
A) div * span {background-color: pink;}
B) span div {background-color: pink;}
C) div span {background-color: pink;}
D) div#span {background-color:pink;}

8. ..................... would select only <a> tags that are descendants of some tag found under the body element.
A) body a {color:green;}
B) body a * {color: green;}
C) a body {color: green;}
D) body * a {color: green;}

9.  ................. form a rule to match only elements that are directly enclosed within another element.
A) child selectors
B) element selectors
C) class selectors
D) contextual selectors

10. ........................... is specified using the plus sign(+) and is used to select elements that would be siblings of each other.
A) child selector
B) adjacent-sibling selector
C) class selector
D) contextual selector

Read More »

Top 20 MCQ Questions On HTML5 Element Reference

This set of top 20 multiple choice questions on HTML5 element reference includes collections of multiple choice objective questions related to HTML5 elements and their corresponding attributes. You will find the MCQ questions about the elements <textarea>, <var>, <small>, <table>, <thead>, <tbody> and <tfoot> elements  along with the related attributes of them.

1. The HTML5 attribute, ...................... is used in <textarea> element should be set to a string that corresponds to the id of the form element that an interactive control such as a button is associated with.
A) form
B) pattern
C) placeholder
D) control

2. ...................... is the HTML5 attribute that specifies a regular expression against which the field should be validated.
A) form
B) pattern
C) validate
D) control

3. ........................ is the HTML5 attribute that specifies a short bit of text that is used to help the user figure out what type of information to fill in for a form control.
A) form
B) pattern
C) placeholder
D) control

4. A <textarea> element cannot be descendant of a/an .............................. element.
A) form
B) div
C) button
D) article

5. ....................... element is used to group the rows within the footer of a table so that common alignment and style defaults can easily be set for numerous cells.
A) <tgroup>
B) <tfoot>
C) <grows>
D) <frows>

6. The ............................. attribute used in <th> element is used to provide a name for a group of related headers.
A) rheaders
B) groupheaders
C) axis
D) scope

7. The ......................... attributive used in <th> element takes a space separated list of id values that correspond to the header cell related to this cell.
A) headers
B) scope
C) thead
D) cell

8. The ........................ attribute specifies the table cells for which the current cell provides header information.
A) headers
B) scope
C) thead
D) cell

9. The ....................... element is used to group the rows within the header of a table so that common alignment and style defaults can easily be set for numerous cells.
A) headers
B) scope
C) thead
D) multi-cell

10. The <title> element must occur within a document's ............................ element and must be present in all valid documents.
A) <meta>
B) <link>
C) <head>
D) <body>
Read More »

Top 20 Objective Questions On HTML5 Element Reference

This set of top 20 objective questions on HTML5 element reference includes collections of multiple choice objective questions related to HTML5 elements and their corresponding attributes. You will find the questions and answers about the elements <ins>, <label>, <legend>, <meter>, <link>, <table>, <tr>, <td> along with the related attributes of them.

1. ..................... element in HTML5 is used to indicate that text has been added to the document.
A) <add>
B) <ins>
C) <fill>
D) <insert>

2. The value of ................. attribute is a URL that designates a source document or message for the information inserted.
A) href
B) src
C) cite
D) msg

3. ................... attribute used in <ins> element is intended to point to information explaining why the text was changed.
A) inf
B) ctxt
C) cite
D) msg

4. .................... attribute used in <ins> element is used to indicate the date and time the insertion was made.
A) datetime
B) insertdate
C) insertdt
D) insdatetime

5. ................... element is used to control the generation of key pairs in secured communications.
A) control key generation
B) control generation key
C) key pair generation
D) key pair control

6. The ................... element in HTML5 is used to relate descriptions to form controls.
A) <desc>
B) <formdesc>
C) <relate>
D) <label>

7. <legend> is used to assign a caption to a set of form fields as defined by a ................ element.
A) fieldset
B) caption
C) fieldgroup
D) assign

8. ...................... is the empty element found in the head element specifies relationships between the current document and other documents.
A) link
B) rel
C) meta
D) join

9. The HTML5 element .................. defines a scalar measurement within a known range, similar to what might be represented by gauge.
A) <measure>
B) <meter>
C) <gauge>
D) <scalar>

10. The HTML5 Boolean attribute ................... .is used to indicate if the style should apply only the tree it is enclosed within.
A) media
B) scoped
C) type
D) enclosed
Read More »

Top 20 Interview Questions On HTML5 Element Reference

Here are the collections of 20 multiple choice interview questions on HTML5 elements reference, that includes MCQ on different types of HTML5 elements and element specific attributes. You will find the questions and answers about the elements and element specific attributes of definition list, forms, image and input elements. 

1. ..................... is the element specific attribute of <dl>, which reduces the white space between list items.
A) compact
B) reduce
C) space
D) eliminate

2. The element ...................... identifies a definition list term in a list of terms and definitions.
A) <dd>
B) <dt>
C) <dl>
D) <definition>

3. In HTML5 the element .................... is also used within <details> and <figure> tags to represent a caption for content.
A) <dd>
B) <dt>
C) <dl>
D) <caption>

4. The HTML5 element ........................ represents a group of content enclosed in a dd element, often with a caption defined by a dt element.
A) <map>
B) <group>
C) <figure>
D) <dl>

5. The default text size for a document can be set using the size attribute of the ..................... element.
A) <base>
B) <basefont>
C) <bdo>
D) <big>

6. .................... attribute of <form> element specifies the list of character encoding for input data that must be accepted by the server processing the form.
A) list-charset
B) accept-charset
C) action-charset
D) form-charset

7. ..................... attribute contains the URL of the server program that will process the contents of the form.
A) src
B) ismap
C) action
D) desc

8. ..................... attribute in <img> element indicates that the URL of the  server program that will process the contents of the form.
A) src
B) ismap
C) action
D) desc

9. ................. attribute in  image element specifies the URL of a document that contains a long description of the image.
A) desc
B) longURL
C) longdesc
D) deepdesc

10. ................. is the  nonstandard attribute, which contains the URL of an image to be initially loaded.
A) lowsrc
B) src
C) start
D) desc

Read More »

MCQ Questions On HTML5 Element Reference Part-2

Here are the collections of 20 multiple choice objective questions on HTML5 elements reference, that includes MCQ on different types of HTML5 elements and element specific attributes. You will find the questions and answers about formenctype and formmethod attributes, canvas shadow properties, different values used in formmethod attributes along with the different method used to draw shapes using canvas methods.

1. In HTML5 ................... attribute is set to the MIME type for how data should be transmitted to the URL specified in the action attribute.
A) formenctype
B) formmethod
C) formtarget
D) formvalidate

2. In HTML5 ................. attribute indicates how form information should be transferred to the server using particular HTTP method.
A) formenctype
B) formmethod
C) formtarget
D) formvalidate

3. A ............. value in the formmethod attribute within button element indicates that form data should be appended to the URL specified by the action attribute creating a query string.
A) post
B) get
C) put
D) delete

4. A value of ..................... for formmethod attribute transfers that data of the form in the message body using the HTTP post method.
A) post
B) get
C) put
D) delete

5. In HTML5 ................. attribute is set to the name of a window or frame that the button action will target the result of action, similar to the target attribute on <a> and <form> tags.
A) formenctype
B) formmethod
C) formtarget
D) formvalidate

6. In primary canvas method .................. returns an object that exposes the API necessary for accessing the drawing functions.
A) width
B) height
C) toDataURL
D) getContext

7. Which of the following is NOT the canvas rectangle method
A) clearRect
B) fillRect
C) drawRect
D) strokeRect

8. Which of the following is/are the canvas shadow properties of HTML5.
i) shadowBlur    ii) shadowLine   iii) shadowColor   iv) shadowOffsetX
A) i, ii and iii only
B) ii, iii and iv only
C) i, iii and iv only
D) All i, ii, iii and iv only

9. .................. method of canvas rectangle draws the outline for the rectangle defined by the starting point(x,y) and the width w and height h.
A) drawRect(x,y,w,h)
B) strokeRect(x,y,w,h)
C) fillRect(x,y,w,h)
D) outlineRect(x,y,w,h)

10. ...................... attribute of <col> element is used to set the character on which the cells in a column should be aligned.
A) span
B) char
C) charoff
D) align
Read More »

MCQ Questions On HTML5 Element Reference Part-1

Here you will find the collections of multiple choice objective questions on HTML5 elements reference, that includes MCQ on different types of elements and element specific attributes used in HTML5.  

1. ........................ are often used to exclude content from older browsers, particularly those that do not understand client side scripting or style sheet.
A) Excludes
B) Comments
C) Coords
D) Messages

2. ................ element defines a hyperlink, the named target destination for hyperlink, or both.
A) Anchor
B) Charset
C) Coords
D) Href

3. ......................... is the element specific attribute which defines the character encoding of the linked resource.
A) Coords
B) Href
C) Rel
D) Charset

4. .................... is the single required attribute for anchors defining a hypertext source link.
A) Coords
B) Href
C) Rel
D) Charset

5. The HTML5 specification suggests that, ....................... should be used to indicate whether a destination is appropriate for screen, print, PDA and so on.
A) method
B) media
C) name
D) shape

6. The .......................... attribute is required in an anchor defining a target location within a page.
A) method
B) media
C) name
D) shape

7. ...................... is the HTML5 specific attribute which is used to specify the URL(s) that will be notified when a link is activated.
A) ping
B) rel
C) rev
D) name

8. For anchors containing the href attribute, the ............................ attribute specifies the relationship of the target object to the link object.
A) ping
B) rel
C) rev
D) name

9. .......................... attribute is useful for indicating where an object came from, such as author of a document.
A) ping
B) rel
C) rev
D) name

10. ......................... attribute is used to define a selectable region for hypertext source links associated with a figure in order to create an image map.
A) shape
B) circle
C) rect
D) map

Read More »

Multiple Choice Questions On HTML5 Element Attributes

This set of multiple choice objective questions on HTML5 element attributes includes MCQ on different attributes of HTML elements that can be applied while developing and manipulating  web pages and web applications. 

1. ................. event occurs when an element loses focus, typically either by clicking the mouse or tabbing.
A) onchange
B) onblur
C) onfocus
D) onreset

2. HTML5 event attribute .................... signals that the form control has lost user focus and its value has been modified during its last access.
A) onchange
B) onblur
C) onfocus
D) onreset

3. ................. event invoked generally by the cancellation of an image load but may happen on any communication  that aborts.
A) onblur
B) onchange
C) onabort
D) onended

4. .................... event fires when a media element's playback has ended because the end of the data resource has been reached.
A) onblur
B) onchange
C) onabort
D) onended

5. HTML5 event attribute ........................ fires when the user agent has the media's metadata describing the media's characteristics.
A) onload
B) onloaded data
C) onloaded metadata
D) onloadstart

6. ..................... event fires when the user agent can playback the media data at the current play position for the first time.
A) onload
B) onloaded data
C) onloaded metadata
D) onloadstart

7. HTML5 event attribute ........................ fires when a page is suspended through not necessarily fully unloaded.
A) onpageshow
B) onpagehide
C) onpopstate
D) onselect

8. In HTML5 event attribute, ....................... fires when the selection state changes for the window.
A) onpageshow
B) onpagehide
C) onpopstate
D) onselect

9. ..................... event generally applies to media elements, but Ajax syntax has used a similar event.
A) onpopstate
B) onprogress
C) onselect
D) onstalled

10. The ..................... event should remain until the context menu is dismissed.
A) onshow
B) onstalled
C) onselect
D) onpageshow

Read More »

Top 20 MCQ Questions On HTML5 Document Structure

This set of multiple choice questions includes the collection of top 20 MCQ questions on HTML5 document structure. It covers objective questions of different elements and attributes used by HTML5, data validation and spell check attributes for the elements used in web forms, elements used to create menus and context menus along with drag and drop API used in HTML5. 

1. HTML5 introduces an ..................... element, which may be used withing content to represent material that is tangential.
A) article
B) aside
C) details
D) section

2. The .................. element is used to define a discrete unit of content such as a blog post, comment, article and so on.
A) article
B) post
C) blog
D) comment

3. In HTML5  ................ element was introduced for highlighting content similarly to how a highlighter pen might be used on important text in a book.
A) highlight
B) mark
C) bookmark
D) marker

4. The HTML5 element, <figure> simply groups items within an enclosed ................... tag.
A) <dd>
B) <dr>
C) <dt>
D) <fd>

5. You can associate the images enclosed within figure element with the caption defined by ......... tag.
A) <dd>
B) <dr>
C) <dt>
D) <fd>

6. The purpose of ..................... element is to encapsulate a group of links that serves as a collection of offsite links, document navigation or site navigation.
A) menu
B) navigation
C) linkgroup
D) nav

7. The ................... element is used to render simple graphics such as line art, graphs and other custom graphical elements on the client side.
A) canvas
B) drawing
C) graphs
D) shapes

8. In HTML5, it is possible to validate data entry by setting the ..................... attribute for a form control.
A) validate
B) required
C) restrict
D) allow

9. When placed ................... attribute on a field should cause a supporting browser to immediately focus this field once the page is loaded.
A) autofill
B) autoplace
C) autofocus
D) autocomplete

10. It is possible to advise the browser to display the .................... suggestions provided for fields if similar field names have been used in the past.
A) autofill
B) autoplace
C) autofocus
D) autocomplete

Read More »