0% found this document useful (0 votes)
0 views

MCQ 2 From Nur E Alam ,HTML, CSS, JavaScript

The document consists of a series of multiple-choice questions related to HTML, CSS, JavaScript, and Visual Studio 2012, along with their correct answers. It covers topics such as HTML elements, CSS properties, JavaScript functions, and Visual Studio features. The content appears to be educational material aimed at testing knowledge in web development technologies.

Uploaded by

patfay208
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

MCQ 2 From Nur E Alam ,HTML, CSS, JavaScript

The document consists of a series of multiple-choice questions related to HTML, CSS, JavaScript, and Visual Studio 2012, along with their correct answers. It covers topics such as HTML elements, CSS properties, JavaScript functions, and Visual Studio features. The content appears to be educational material aimed at testing knowledge in web development technologies.

Uploaded by

patfay208
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Teacher: Muhammad Nur E Alam, nurealam.rajjak@gmail.

com WhatsApp: +8801917975575

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
Answer: e
2. Which of the following sign denotes direct child?
a. >
b. b) +
c. c) »
d. d) -
Answer: a
3. 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>
Answer: a
4. Which of the following is a void element?
a. <vax>
b. <sup>
c. <command>
d. <kbd>
Answer: c
5. Which of the following HTML5 element creates browser button?
a. <b>
b. <base>
c. <bb>
d. <bdo>
Answer: c
6. Which of the following is/are the JavaScript support that Visual Studio .NET 2012 provides?
a. Improved IntelliSense
b. Improved editors
c. IntelliSense from JavaScript comments
d. Breakpoints
e. All of the above
Answer: e
7. Which of the following function do you use to query whether he agrees to take certain action?
a. alert
b. prompt
c. confirm
d. input
Answer: c

Page 1 of 15
Youtube Channel: https://www.youtube.com/@muhammadnurealam
Teacher: Muhammad Nur E Alam, nurealam.rajjak@gmail.com WhatsApp: +8801917975575

8. 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
Answer: d
9. In JavaScript, you can create a string by enclosing in single or double quotes. This
statement is -
a. True
b. False
Answer: a
10. 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
Answer: b
11. Which of the following is/are the CSS3 support that Visual Studio .NET 2012 provides?
a. Expandable Sections
b. Hierarchical Indentations
c. Add Comments
d. Color Selectors
e. All of the Above
Answer: e
12. On which panel can you see a hierarchically structured view of the DOM?
a. Live DOM
b. Projects
c. Assets
d. Device
Answer: a
13. Which of the following is not a valid color in CSS?
a. FFIl000
b. #GG00000
c. rgb(100,100,100)
d. rgba(100,100,100, .5)
Answer: b
14. How can you change the way the browser calculates the width of an element box?
a. By setting padding and margin value to
b. By using display property
c. By setting the box-sizing property
d. By setting the float property
Answer: c

Page 2 of 15
Youtube Channel: https://www.youtube.com/@muhammadnurealam
Teacher: Muhammad Nur E Alam, nurealam.rajjak@gmail.com WhatsApp: +8801917975575

15. Which of the following element do you use to show a separate HTML document within HTML
document?
a. <embed>
b. <object>
c. <iframe>
d. <document>
Answer: c
16. Which panel can you use to access a list of the HTML elements, controls, and media
that can be added to an HTML page that is open in the artboard?
a. Projects
b. Assets
c. Device
d. Live DOM
Answer: b
17. Which of the following statement is true for operator precedence in JavaScript?
a. The multiplication signs (*) and division sign (/) have the same precedence
b. The multiplication signs (*) and division sign (/) has the higher precedence then the division
sign (/)
c. THE DIVISION SIGN (/) has the higher precedence then the multiplication signs (*)
d. none of above
Answer:
18. Type of undefined returns_
a. null
b. object
c. undefined
d. number
Answer:
19. Which of the following is not a valid variable name?
a. gift4 you
b. $p[rice
c. Total$
d. ID#
Answer:
20. Which of the following is the null coalescing operator?
a. ??
b. &
c. |
d. ||
Answer: d
21. To insert a non-breaking space, you can use
a. &space;
b. &br;
c. &nbsp;
d. &#nbsp;
Answer: c

Page 3 of 15
Youtube Channel: https://www.youtube.com/@muhammadnurealam
Teacher: Muhammad Nur E Alam, nurealam.rajjak@gmail.com WhatsApp: +8801917975575

22. You want to retrieve a new array that is part of an existing away. Which of the following array
method should you use?
a. Use the unshift method.
b. Use the shift method
c. Use the slice method.
d. Use the splice method
Answer: c
23. Which of the following is/are the CSS3 support that Visual Studio .NET 2012 provides?
a. Expandable Sections
b. Hierarchical Indentations
c. Add Comments
d. Color Selectors
e. All of the Above
Answer: e
24. Which of the following element typically contains metadata and page-related instructions?
a. html
b. head
c. body
d. title
Answer: b
25. How should you start each HTML5 document?
a) <html>
b) <head>
c) <title>
d) <!DOCTYPE html>
Answer: d
26. Which of the following is/are the JavaScript support that Visual Studio .NET 2012 provides?
a. Improved IntelliSense
b. Improved editors
c. IntelliSense from JavaScript comments
d. Breakpoints
e. All of the above
Answer: e
27. The _________ contains a list of all style sheets attached to the current document.
a. Assets panel
b. Projects panel
c. Style Rules panel
d. Device panel
Answer: c
28. Hich 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;}
Answer:

Page 4 of 15
Youtube Channel: https://www.youtube.com/@muhammadnurealam
Teacher: Muhammad Nur E Alam, nurealam.rajjak@gmail.com WhatsApp: +8801917975575

29. 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
Answer: d
30. 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
Answer: c
31. 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>
Answer: a
32. Which of the following locates the <p> element that is preceded by a <h1> element as the
previous sibling of p?
a. h1 + p
b. hl > p
c. hl p
d. hl-p
Answer: a
33. 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
Answer: d
34. Which of the following enables you to import a CSS file to the current style sheet?
a. @include
b. @insert
c. @import
d. cause
Answer: c

Page 5 of 15
Youtube Channel: https://www.youtube.com/@muhammadnurealam
Teacher: Muhammad Nur E Alam, nurealam.rajjak@gmail.com WhatsApp: +8801917975575

35. Consider the following code:


var age = “21";
alert (age + 1);
What will be displayed?
a. 21
b. 22
c. 211
d. Code will
Answer: b
36. 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
Answer: c
37. To create predefined control values, you use -
a. <optgroup> tag
b. <option> tag
c. <datalist> tag
d. <datagrid> tag
Answer: c
38. Which of the following locates all hyperlinks whose href attribute value starts with http?
a. a[href^='http']
b. a[href*='http']
c. a[href$=http']
d. a[href~='http']
Answer: a
39. Which of the following is vector image format?
a. PNG
b. JPG
c. GIF
d. SVG
Answer: d
40. Which of the following is/are provides a unified development experience that enables
developers to create multitier applications?
a. Visual Studio Professional 2012
b. Visual Studio Ultimate 2012
c. Visual Studio Premium 2012
d. Visual Studio Test Professional 2012
e. Both b and c
Answer: a

Page 6 of 15
Youtube Channel: https://www.youtube.com/@muhammadnurealam
Teacher: Muhammad Nur E Alam, nurealam.rajjak@gmail.com WhatsApp: +8801917975575

41. 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
Answer: c
42. '123' = 123 evaluates to
a. true
b. false
Answer: a
43. What will be result of the following JavaScript Expression: Number. NaN + 1
a. Null
b. 1
c. 0
d. NaN
Answer: d
44. 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
Answer: c
45. How do you ensure browsers are in no-quirks mode and operate in an HTML5 in which the
page is written?
a. BY adding a <!docktype> declaration at the top of the page
b. By eliminating browser implemented tags
c. By writing well-formed document
d. All of the above
Answer:
46. You want to locate all the elements on your webpage that are assigned the CSS class name
hidden. which of the following jquery statement can you use?
a. var hidden =$('#Hidden')
b. var hidden =$('.Hidden')
c. var hidden =$('Hidden')
d. var hidden =$('class=Hidden')
Answer:
47. Which of the following is XML based specification of HTML AND uses tighter rules to write
well-formed document?
a. HTML5
b. XHTML
c. XAML
d. JavaScript
Answer: a

Page 7 of 15
Youtube Channel: https://www.youtube.com/@muhammadnurealam
Teacher: Muhammad Nur E Alam, nurealam.rajjak@gmail.com WhatsApp: +8801917975575

48. Which of the following provides team collaboration tools but not 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
Answer: a
49. Where do you maintain the presentation of a HTML5 document?
a. in HTML file
b. In CSS3 Stylesheet
c. in your JavaScript file
d. In style attribute of HTML elements
Answer: c
50. In JavaScript, you can create a string by enclosing in single or double quotes, this statement
is_
a. True
b. False
Answer: a
51. Visual studio 2012 is a highly useful tool for application development this statement is_
a. True
b. False
Answer: a
52. The 64-bit number of JavaScript is divided into how many components?
a. one
b. two
c. three
d. four
Answer:
53. _______ doesn't have a defined set of Tag names.
a. XHTML
b. HTML5
c. XML
d. XAML
Answer:
54. ________rule enables you to import a CSS file to the current style sheet.
a. @link
b. @import
c. @embed
d. @url
Answer:
55. Which of the following attribute is used to uniquely identify an element in a page?
a. name
b. id
c. class
d. Ref
Answer: b

Page 8 of 15
Youtube Channel: https://www.youtube.com/@muhammadnurealam
Teacher: Muhammad Nur E Alam, nurealam.rajjak@gmail.com WhatsApp: +8801917975575

56. Which of the following is not valid assignment?


a. var n = null
b. var n = undefined
c. var n ="
d. var n = n||" "
Answer:
57. Which of the following CSS selector of the following selects al checkbox’s that are in checked
state?
a. input[type='checkbox']:checked
b. input[checked]
c. checkbox:checked
d. All of the above
Answer:
58. 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
Answer: c
59. Which of the following is not a valid array initialization?
a. ar pizzaParts = new Array();
pizzaParts[0] ='pepperoni;
pizzaParts[1] ='onion;
pizzaParts[2] = bacon;
b. bvar pizzaParts = new Array('pepperoni', 'onion', 'bacon');
c. var pizzaParts = ['pepperoni', 'onion', 'bacon'];
d. var pizzaParts = new Array(){'pepperoni', 'onion', 'bacon'};
Answer: d
60. Which of the following is used to coalesing opeartor?
a. :first:line
b. :after
c. :before
d. :hover
Answer:
61. The free editions of Visual Studio 2012 are the Express editions. This statement is
a. True
b. False
Answer: a
62. How can set color in CSS?
a. Using color names
b. RGB color values
c. RGBA color values
d. All of the above
Answer: d

Page 9 of 15
Youtube Channel: https://www.youtube.com/@muhammadnurealam
Teacher: Muhammad Nur E Alam, nurealam.rajjak@gmail.com WhatsApp: +8801917975575

63. Which of the following statement is/are true?


a. The Assets panel contains a list of all available assets of the project.
b. The Live DOM panel enables you to select an element and apply style rules to it.
c. Both a and b
d. None of the above
Answer: c
64. Why is the<area>element used?
a. to define region in geolocation map
b. to define region an article
c. to define an image map region
d. to create hots pot in a page
Answer:
65. HTML originates from-
a. XML
b. XHTML
c. SGML
d. RTF
Answer:
66. you have a webpage with element that contains the customer's name, you want to include
the customer number on the element, but you don't want to display the customer number
which of the following accomplish it?
a. <Span hidden-customer Number = '123'>contoso Ltd</Span>
b. <Span data-customer Number = '123'>contoso Ltd</Span>
c. <Span title = '123'>contoso Ltd</Span>
d. <div><Spa id='customer Number style=display:none;123</Span><contoso Ltd</Span></div>
Answer:
67. Which of the following create email link?
a. <a href="email:someone@somewhere.com">someone@Shomwhere.com</a>
b. <a href="mail:someone@somewhere.com">someone@Shomwhere.com</a>
c. <a href="mailto:someone@somewhere.com">someone@Shomwhere.com</a>
d. <a href="mail-to:someone@somewhere.com">someone@Shomwhere.com</a>
Answer:
68. Which of the following supports animations?
a. PNG
b. JPG
c. GIF
d. SVG
Answer: c
69. What is extension of html file?
a. .html
b. xml
c. xhtml
Answer: a

Page 10 of 15
Youtube Channel: https://www.youtube.com/@muhammadnurealam
Teacher: Muhammad Nur E Alam, nurealam.rajjak@gmail.com WhatsApp: +8801917975575

70. What is the correct HTML for creating a hyperlink?


a. <a name="">A</a>,
b. <a>B</a>,
c. <a href="http://www.example.com">example</a>
d. <a url="http://www.example.com">example</a>
Answer: c
71. What does HTML stand for?
a. Hyperlinks and Text Markup Language
b. Home Tool Markup Language
c. Hyper Text Markup Language
Answer: c
72. 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
Answer: d
73. In JavaScript, type of is _____
a. a function
b. an object
c. a unary operator
d. a value of for an unassigned variable
Answer: c
74. 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
Answer: a
75. Which of the following uses a child selector?
a. div span
b. div + span
c. div > span
d. div - span
Answer: c
76. What is the purpose of HTML in a web page?
a. providing a meaningful structure
b. providing presentation to the document
c. adding belaalloa to New document
d. making the document universal to the browser
Answer: a

Page 11 of 15
Youtube Channel: https://www.youtube.com/@muhammadnurealam
Teacher: Muhammad Nur E Alam, nurealam.rajjak@gmail.com WhatsApp: +8801917975575

77. The ________ element is a unit of content that can stand on its own and be copied to other
locations.
a. <header>
b. <article>
c. <footer>
d. <section>
Answer: b
78. What is the correct HTML for making a drop-down list?
a. <input type="list" />
b. <select>
c. <list>
d. <input type="dropdown" />
Answer: b
79. Consider the following code
var x = 10:
var y = 20;
alert (String(x) + String(y));
What will be displayed?
a. 20
b. 30
c. 1020
d. Code will produce error
Answer: c
80. Where do you maintain the behavior of a HTML5 document?
a. In HTML file
b. In CSS3 stylesheet
c. In JavaScript file
d. In <script> elements
Answer: c
81. 14.Which is of the following is not void element?
a. meta
b. link
c. hr
d. tr
Answer: c
82. Which of the following is or are the valid way to display html entities?
a. &entity_name;
b. &#entity_number;
c. #entity_name;
d. #entity_number;
e. both a & b
f. both c&d
Answer:

Page 12 of 15
Youtube Channel: https://www.youtube.com/@muhammadnurealam
Teacher: Muhammad Nur E Alam, nurealam.rajjak@gmail.com WhatsApp: +8801917975575

83. Which of the following attribute do you use in element to specify taiget device?
a. Device
b. Media
c. User-agent
d. Type
Answer:
84. Browsers ignore tags that are not recognized.
a. True
b. False
Answer:
85. You have a button defined like below:
<button id='save'>Save</button>
86. You want to attach a click event handler to the button and handler will execute on event
bubbling phase. Which of the following code should you use ?
a. document.getElementById('save').onclick=()=>{...}
b. <button id='save onclick="()->{...}">Save</button>
c. document.getElementById('save').addEventListener('click', ()=>{...}, true)
d. document.getElementById('save').addEventListener('click', ()->{...}, false)
Answer:
87. Author defined custom attributes are also known as _________attributes.
a. Expand
b. Extended
c. added
d. free
Answer:
88. You have the 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 to 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
Answer:

89. HTML uses _________to provide formatting features to content.


a. Tag
b. Attributes
c. Statements
d. Semantics
Answer:

Page 13 of 15
Youtube Channel: https://www.youtube.com/@muhammadnurealam
Teacher: Muhammad Nur E Alam, nurealam.rajjak@gmail.com WhatsApp: +8801917975575

90. Default appearance of visited link is-


a. Underlined and blue
b. Underlined and purple
c. Underlined and red
d. Underlined and green
Answer: b
91. Which of the following CSS property to control the amount of transparency an element will
have?
a. transparency
b. alpha
c. opacity
d. visible
Answer:
92. Consider the code below:
var pizzaMeatParts = ['pepperoni, 'ham', 'bacon']; var meatParts = pizzaMeatParts.join();
alert (meatParts);
What will be displayed?
a. pepperoni ham bacon
b. pepperoni, ham, bacon
c. pepperonihambacon
d. pepperoni-ham-bacon
Answer:
93. When forms and scripts are disabled in an embedded content?
a. When sandbox attribute is added.
b. When seamless attribute is added.
c. Both a and b
d. None of the above
Answer:
94. Which of the following array method removes and returns the first item in the array?
a. push
b. shift
c. slice
Answer:
95. 3="3" evaluates to
a. true
b. false
Answer: a
96. Which of the following is not a valid variable name?
a. gift4you
b. Sprice
c. Totals
Answer:

Page 14 of 15
Youtube Channel: https://www.youtube.com/@muhammadnurealam
Teacher: Muhammad Nur E Alam, nurealam.rajjak@gmail.com WhatsApp: +8801917975575

97. Which of the following tag should you use for providing alternative content for no script
support?
a. <script>
b. <noscript>
c. <alt>
d. <content>
Answer:
98. Which of the following is the preferred way of adding checked attribute in an input box?
a. <input type="checkbox" name="fruit" 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>
Answer:

--https://letsfindcourse.com/technical-questions/javascript-mcq/javascript-mcq-questions
--https://www.javatpoint.com/javascript-mcq
--https://www.sanfoundry.com/1000-javascript-questions-answers/
--https://www.includehelp.com/mcq/javascript-multiple-choice-questions-mcqs.aspx

Page 15 of 15
Youtube Channel: https://www.youtube.com/@muhammadnurealam

You might also like