MCQ 4 From Nur E Alam ,HTML, CSS, JavaScript
MCQ 4 From Nur E Alam ,HTML, CSS, JavaScript
1. Which of the following is/are Provides team collaboration tools but not a full development
IDE?
a. Visual Studio Team Foundation Server Express 2012
b. Visual Studio Ultimate 2012
c. Visual Studio Premium 2012
d. Visual Studio Test Professional 2012
e. Both b and c
2. Which of the following sign denotes direct child?
a. >
b. +
c. »
d. –
3. Which of the following element typically contains metadata and page-related instructions?
a. Html
b. Head
c. Body
d. Title
4. A self-closing tag is a beginning tag and an ending tag in
a. One
b. Two
c. Both a and b
d. None of it.
5. You would like to create web applications and Windows 8 Windows Store applications by
using HTMLS, JavaScript, and CSS3, but while you're learning, you don't want to buy Visual
Studio 2012. Which of the following Visual Studio 2012 editions can you use for free to
accomplish your goal?
a. Visual Studio Professional 2012
b. Visual Studio Premium 2012
c. Visual Studio Express 2012 for Web
d. Both a and b
6. Which of the following is a declaration to the web browser that describes the
version of HTML in which the page is written?
a. <!DOCTYPE html>
b. <html>
c. <meta charset =”UTF-8”>
d. <body>
7. '123' = 123 evaluates to
a. True
b. False
8. How do you define custom font that will be downloaded to user machine if it is not
available?
a. Using @font-family rule
b. Using @face rule
c. Using @font-face rule
d. Using @font-url rule
9. 3 == "3" evaluates to
a. true
b. false
Page 1 of 13
Youtube Channel: https://www.youtube.com/@muhammadnurealam
Teacher: Muhammad Nur E Alam, [email protected] WhatsApp: +8801917975575
Page 2 of 13
Youtube Channel: https://www.youtube.com/@muhammadnurealam
Teacher: Muhammad Nur E Alam, [email protected] WhatsApp: +8801917975575
18. . The free editions of Visual Studio 2012 are the Express editions. This statement is
a. True
b. False
19. You would like to create a web application by using HTML5, JavaScript, and CSS3. Which of
the following Visual Studio 2012 editions can you use?
a. Visual Studio Express 2012 for Windows 8
b. Visual Studio Professional 2012
c. Visual Studio Express 2012 for Web
d. Both b and c
20. Default appearance of visited link is
a. Underlined and blue
b. Underlined and purple
c. Underlined and red
d. Underlined and green
21. Which of the following enables you to import a CSS file to the current style sheet?
a. @include
b. @insert
c. @import
d. Cause
22. . The _____ enables you to run the application by using simulations of different screen
sizes and orientations.
a. Assets panel
b. Projects panel
c. Style Rules panel
d. Device panel
23. In JavaScript, You can create a string by enclosing in single or double quotes. This
statement is –
a. True
b. False
24. Which of the following is composed of a beginning tag, an ending tag, and the content
between the tags?
a. Attribute
b. Element
c. Markup
d. Style
25. Consider the following code:
var age = “21";
alert ( age + 1);
What will be displayed?
a. 21
b. 22
c. 211
d. Code will produce error
26. Which of the following is not true about HTML5?
a. HTML5 can play audio and video and support animations from within the browser
without the need for plug-ins.
b. HTML5 contains most of the tags from HTML 4.01
c. HTML5 redefines some existing tags to be semantic tags
d. HTML5 does not introduce any new tag or attribute
Page 3 of 13
Youtube Channel: https://www.youtube.com/@muhammadnurealam
Teacher: Muhammad Nur E Alam, [email protected] WhatsApp: +8801917975575
How can you make sure that user input is valid number?
a. Use is NaN function, pass the age variable as argument. If the function call returns
true, user input is not valid number
b. Use parseInt function, pass the age variable as argument. If no error is raised user
input is valid number
c. Use Number function, pass the age variable as argument, If the function call returns
true, user input is valid number
d. Any one of the above can do
30. On which panel can you see a hierarchically structured view of the DOM?
a. Live DOM
b. Projects
c. Assets
d. Device
31. Which of the following is the best way to add custom attributes?
a. Prefix the attribute with "data-"
b. Prefix the attribute with "custom-"
c. Prefix the attribute with "-"
d. HTML4 or HTML5 does not allow custom attributes
32. . Which of the following is the preferred way of adding checked attribute in an input box?
a. <input type=”checkbox” name=”fruite” value=”Apple” checked/>
b. <input type=" checkbox" name="fruit" value="Apple" checked="/>
c. <input type="checkbox" name="fruit" value="Apple" checked='checked'/>
d. <input type="checkbox" name="fruit" value="Apple> checked </input>
33. What will be the padding in flowing rule? Padding: 5px 15px 10px;
a. top 5px, right 15px, bottom 10px and left 10px
b. top 5px, right 15px, bottom 5px and left 10px
c. top 5px, right 15px, bottom 10px and left 15px
d. top 15px, right 15px, bottom 10px and left 15px
34. How browsers are made forward compatible?
a. Browsers always have built-in feature to updates themselves with new standards.
b. Browsers always look for meaning from central repository if encounter new tags.
c. Browsers always ignore tags that they don't recognize.
d. Browsers asks user to provide meanings for tags that they don't recognize
Page 4 of 13
Youtube Channel: https://www.youtube.com/@muhammadnurealam
Teacher: Muhammad Nur E Alam, [email protected] WhatsApp: +8801917975575
35. Which of the following attribute is used to uniquely identify an element in a page?
a. name
b. id
c. class
d. Ref
36. Which of the following is not a valid array initialization?
a. var pizzaParts = new Array();
pizzaParts[0] ='pepperoni;
pizzaParts[1] ='onion;
pizzaParts[2] = bacon;
b. var pizzaParts = new Array('pepperoni', 'onion', 'bacon');
c. var pizzaParts = ['pepperoni', 'onion', 'bacon'];
d. var pizzaParts = new Array(){'pepperoni', 'onion', 'bacon'};
37. You are writing a function that will handle the click event of an hyperlink. You want to
stop the default behavior of the hyperlink. How would you write the function?
a. function f() {//....; return false;}
b. function f() {//....; return true;}
c. function f() {//....; e.stopPropagation();}
d. famccion fie) III--; e.prevent.Dfault();}
38. Which of the following CSS3 module allows to adapt the rendering of HTML documents
based on conditions such as screen resolution and orientation to accommodate different
devices such as smartphones and tablets?
a. Media queries
b. Namespaces
c. Level3 selectors
d. All of the above
39. HTML tags provide a meaningful structure, but do not provide presentation.
a. True
b. False
40. How will the following will be interpreted? rgb(-100,500,0)
a. Red=255, Green=255, Blue=0
b. Red=0, Green=0, Blue=0
c. Red=0, Green=255, Blue=0
d. Red=255, Green=255, Blue=255
41. Consider the code block:
if(myVar){
alert('myVar has a value'); }
For which of the following value in myVar, a message will be displayed, stating that myVar
has a value?
a. null
b. undefined
c. string containing at least one character
d. 0
42. Where do you maintain the behavior of a HTML5 document?
a. In HTML file
b. In CSS3 stylesheet
c. In JavaScript file
d. In
Page 5 of 13
Youtube Channel: https://www.youtube.com/@muhammadnurealam
Teacher: Muhammad Nur E Alam, [email protected] WhatsApp: +8801917975575
Page 6 of 13
Youtube Channel: https://www.youtube.com/@muhammadnurealam
Teacher: Muhammad Nur E Alam, [email protected] WhatsApp: +8801917975575
Page 7 of 13
Youtube Channel: https://www.youtube.com/@muhammadnurealam
Teacher: Muhammad Nur E Alam, [email protected] WhatsApp: +8801917975575
60. Which of the following changes font color of the contents of all p element except
those have class primary
a. P[class not’primary’]{color : red;}
b. P[class !=’primary’]{color : red;}
c. P: not(.primary){color : red;}
d. P[not(primary)]{color : red;}
61. You add a comment to your stylesheet that says”temporary”. Which of the
following is the proper line to add to the CSS file?
a. //temporary
b. –temporary
c. /*temporary*/
d. Rem temporary
62. Which of the following is not a CSS3 pseudo element?
a. ::first-line
b. ::after
c. ::before
d. :hover
63. How do you ensure browser are in no-quikrks mode and operate in an HTML5-
compliant manner?
a. By adding a <!doctype> declaration at the top the page
b. By eliminating browser implemented tags
c. By writing well-formed document
d. All of the above
64. HTML originates from-
a. XML
b. XHTML
c. SGML
d. RTF
65. Which of the following is not valid value of the box-sizing property?
a. Comment box
b. Border-box
c. Padding-box
d. Margin-box
66. javascript is untyped. What does it mean?
a. JavaScript is case insensitive
b. JavaScript has no data type
c. JavaScript is interested language
d. When you create a variable, you don’t need to specify its type.
67. Which of the following attributes can be used in any HTML5 elements?
a. Global attributes
b. Expando attributes
c. Boolean attributes
d. Style attributes
Page 8 of 13
Youtube Channel: https://www.youtube.com/@muhammadnurealam
Teacher: Muhammad Nur E Alam, [email protected] WhatsApp: +8801917975575
Page 9 of 13
Youtube Channel: https://www.youtube.com/@muhammadnurealam
Teacher: Muhammad Nur E Alam, [email protected] WhatsApp: +8801917975575
Page 10 of 13
Youtube Channel: https://www.youtube.com/@muhammadnurealam
Teacher: Muhammad Nur E Alam, [email protected] WhatsApp: +8801917975575
81. You are showing a different HTML pages within the current page and you want
that embedded page allow form, script but still disabling plug-ins and pop-ups.
Which of the following accomplished this?
a. <iframe sandbox></iframe>
b. <iframe sandbox=” allow-forms allow-scripts”
scr=”http://otherContent.com/content.html” ></iframe>
c. <iframe allow-forms=”True” allow-scripts=”true”
scr=”http://otherContent.com/content.html” ></iframe>
d. <iframe forms scripts scr=”http://otherContent.com/content.html”
></iframe>
82. Author defined custom attributes are also known as
___________________attributes.
a. Expando
b. Extended
c. Added
d. Free
83. Which of the following is or are the valid way to display html entities?
a. &entity_name
b. &#entity_number
c. #entity_name
d. Both A & B
e. Both c & d
84. Null === undefined returns
a. True
b. False
85. _______ doesn’t have a defined set of tag names
a. XHTML
b. HTML5
c. XML
d. XAML
86. You have following HTML:
<div>
<span> This span is the only child of its parent </span>
</div>
<div>
<span> This span is the first one of the two children of its parent </span>
<span> This span is the second one of the two children of its parent </span>
</div>
Which of the following styles only the span content of first div of red?
a. div > span {color : red;}
b. span: only-child {color:red;}
c. div span: first-of-type {color:red;}
d. all of the above
e. none of the above
Page 11 of 13
Youtube Channel: https://www.youtube.com/@muhammadnurealam
Teacher: Muhammad Nur E Alam, [email protected] WhatsApp: +8801917975575
87. Which of the following type of attributes contain the attribute name but no value?
a. Boolean attributes
b. Vold attributes
c. Null attributes
d. All attributes
88. How do you create a clickable image map in your HTML document?
a. Within the <img> element create a <map> with clickable region defined by
<area> elements
b. Create a <map> with clickable region defined by <area> elements in it and set
the usemap attribute of the <img> element to the <map> element’s name
c. Create a <map> element and inside the <map> add clickable region defined
by <area> elements and add a <img> element
d. Create a image hyperlink and add JavaScript function to capture the
coordinate of clicked spot and identify region
89. Which of the following is not valid value of the box-sizing property?
a. Content-box
b. Border-box
c. Padding-box
d. Margin-box
90. Type of NaN returns
a. Nan
b. Null
c. Undefined
d. Number
91. ______ rule enables you to import a CSS file to the current style sheet.
a. @link
b. @import
c. @embed
d. @url
92. An attribute is a-
a. Name=”value” pair
b. Key container
c. Both a & b
d. None of the above
93. Which of the following array method removes and returns the first item in the
array
a. Push
b. Pop
c. Shift
d. Slice
94. Which of the following is not a void element?
a. Link
b. Br
c. Hr
d. Div
Page 12 of 13
Youtube Channel: https://www.youtube.com/@muhammadnurealam
Teacher: Muhammad Nur E Alam, [email protected] WhatsApp: +8801917975575
95. You click a hyperlink to an external resources, the external resorce opens on the
current browser window. How do you control this behavior?
a. By using the target attribute
b. By using the href attributes
c. By attaching a javascript click event handler
d. You cannot change the default behavior
Page 13 of 13
Youtube Channel: https://www.youtube.com/@muhammadnurealam