Basic HTML MCQ with Answer and Explanation set-1

Q 1. State whether the given statement is true or false. !DOCTYPE is case sensitive�
A) True
B) False

Show Answer

Answer: Option B
Solution: In XML it is while in HTML it is not.


Q 2. Choose the correct statement of HTML
A) In traditional XHTML close tag for some elements is optional but not encouraged
B) In traditional HTML close tag for some elements is optional but not encouraged
C) None of the mentioned
D) In both traditional XHTML and HTML close tag for some elements is optional
Show Answer

Answer: Option B
Solution: In HTML close tags are optional but not in XHTML.


Q 3. Which of the following is not a difference between HTML and XHTML
A) Charset in html is �text/html� where as in xhtml it is �application/xml+xhtml�
B) None of the mentioned
C) Tags and attributes are case-insensitive in HTML but not in XHTML
D) Special characters must be escaped using character entities in XHTML unlike HTML
Show Answer

Answer: Option B
Solution: All other options are correct.


Q 4. What indicates the content in file is HTML when delivered on the network.
A) The extension of the file �.html�
B) The �content-type� header
C) Both �.html� extension and �content-type� header
D) None of the mentioned
Show Answer

Answer: Option B
Solution: Content-type: header indicates the content in file is html.


Q 5. State whether the given statement is true or false. �We can intermix XHTML and HTML 4.01 documents�
A) True
B) False
Show Answer

Answer: Option B
Solution: HTML is not in XML format. You have to make the changes necessary to make the document proper XML before you can get it accepted as XML.


Q 6. HTML and XHTML stands for
A) Hyper Text Markup Language and EXtensible HyperText Markup Language
B) Hyper Text Markup Language and EXtensible HyperText Marking Language
C) Hyper Text Marking Language and EXtensible HyperText Marking Language
D) None of the mentioned
Show Answer

Answer: Option A
Solution: HTML and XHTML are abbreviated as mentioned in the correct option.


Q 7. Choose the correct tag for largest heading in HTML.
A) h6
B) heading
C) h1
D) head
Show Answer

Answer: Option C
Solution: h1 is the largest while h6 is the smallest by convention for headings in HTML.


Q 8. Which of the following are table tags?
A) table, thead, tr, td
B) colspan, table, tr
C) table, tt, tr, td
D) none of the mentioned
Show Answer

Answer: Option A
Solution: Other options include table row elements and attributes.


Q 9. Choose the correct XHTML for width attribute and its value.
A) width=80
Q 10. Which of the following options follows content model in HTML?
i.

    Option one

ii.

  • Option two


A) i
B) ii
C) i and ii
D) None of the mentioned

Show Answer

Answer: Option B
Solution: Content model specifies that certain elements are supposed to occur only within other elements.


Q 11. Which of the following markup is correct?
i. is in error as tags cross
ii. is not since tags nest

A) i
B) ii
C) i and ii
D) None of the mentioned
Show Answer

Answer: Option B
Solution: Tags in HTML are always nested.


Q 12. Which of the following is not a correct (X)HTML rule?
A) Attributes should be quoted
B) Tags should nest not tag
C) Unused elements may be minimized
D) Unknown attributes are ignored by the browser
Show Answer

Answer: Option D
Solution: Browser ignores unknown attributes.


Q 13. Identify the count of mistakes in the following markup.



    • Hello





  • A) 2
    B) 3
    C) 1
    D) 0

    Show Answer

    Answer: Option B
    Solution:

    should not be in

  • ,
    and

    shpuld be closed.


    Q 14. Rendering engine is not responsible for
    A) parsing the markup content (HTML)
    B) parsing style information (CSS, XSL, and so on)
    C) generating a visual presentation of the formatted content including media files referenced
    D) none of the mentioned
    Show Answer

    Answer: Option D
    Solution: All the options mentioned are responsibility of rendering engine.


    Q 15. Firefox uses _________ rendering engine.
    A) WebKit
    B) Gecko
    C) Trident
    D) Presto
    Show Answer

    Answer: Option B
    Solution: Gecko is a web browser engine used in many applications developed by Mozilla Foundation and the Mozilla Corporation as well as in many other open source software projects. Gecko is free and open-source software subject to the terms of the Mozilla Public License version 2.


    Q 16. State true or false. It is faster to render HTML and CSS than to interpret and execute JavaScript.
    A) True
    B) False
    Show Answer

    Answer: Option A
    Solution: When it comes to ordering your CSS and JavaScript, you want your CSS to come first. The reason is that the rendering thread has all the style information it needs to render the page. If the JavaScript includes come first, the JavaScript engine has to parse it all before continuing on to the next set of resources.


    Q 17. What is the use of �defer� attribute?
    A) It defers rendering of html page
    B) It defers script execution until the page has been rendered
    C) It defers rendering of css attributes
    D) None of mentioned
    Show Answer

    Answer: Option B
    Solution: The defer attribute is a boolean attribute. When present, it specifies that the script is executed when the page has finished parsing.


    Q 18. Which of the following statements is false?
    A) async and defer attributes of script tag execute before the DOMContentLoaded event
    B) defer executes each script sequentially
    C) async executes each script when it is ready
    D) all older browsers supports async attribute
    Show Answer

    Answer: Option D
    Solution: All older browsers does not support async. So async and defer are used together in combination.


    Q 19. Which of the following is used to read a HTML page and render it?
    A) Web browser
    B) Web server
    C) Web matrix
    D) None of the mentioned
    Show Answer

    Answer: Option A
    Solution: A web browser (commonly referred to as a browser) is a software application for retrieving, presenting and traversing information resources on the World Wide Web.


    Q 20. Which of the following is the first web browser?
    A) Nexus
    B) Netscape Navigator
    C) Internet Explorer
    D) Mosaic
    Show Answer

    Answer: Option A
    Solution: The first web browser was invented in 1990 called World Wide Web which was later renamed to Nexus.


    Q 21. Who created the first web browser
    A) Tim Berners Lee
    B) Jacobs,Lan
    C) Marc Andeersen
    D) Mozilla foundation
    Show Answer

    Answer: Option A
    Solution: Sir Timothy John �Tim� Berners-Lee, also known as TimBL, is an English computer scientist, best known as the inventor of the World Wide Web. He made a proposal for an information management system in March 1989, and he implemented the first successful communication between a Hypertext Transfer Protocol (HTTP) client and server via the Internet sometime around mid-November of that same year.


    Q 22. State true or false. Nexus is first graphical web browser.
    A) True
    B) False
    Show Answer

    Answer: Option B
    Solution: Netscape is first graphical web browser.


    Q 23. The open source software version of netscape is
    A) Chrome
    B) Mozilla
    C) Internet Explorer
    D) Erwise
    Show Answer

    Answer: Option B
    Solution: On February 23, 1998, Netscape Communications Corporation created a project called Mozilla to co-ordinate the development of the Mozilla Application Suite, the open source version of Netscape�s internet software, Netscape Communicator.


    Q 24. Which of the following is not an IDE
    A) BlueGriffon 1.5.2
    B) Aptana studio 3
    C) TextEdit(Mac)
    D) Dreamweaver
    Show Answer

    Answer: Option C
    Solution: TextEdit is a highly versatile word processor included with OS X.


    Q 25. IDE stands for
    A) Internet Development Environment
    B) Integrated Development Environment
    C) Intelligent Development Environment
    D) None of the mentioned
    Show Answer

    Answer: Option B
    Solution: An integrated development environment (IDE) or interactive development environment is a software application that provides comprehensive facilities to computer programmers for software development. An IDE normally consists of a source code editor, build automation tools and a debugger.


    Q 26. We can define ________ number of sites with one copy of dreamweaver installed on our computer.
    A) 990
    B) 10
    C) only 1
    D) unlimited
    Show Answer

    Answer: Option D
    Solution: Dreamweaver is an IDE to build custom web apps and applications. There is no definite liit to it.


    Q 27. What should we add to a template in Dreamweaver in order to control where page content goes?
    A) Editable Regions
    B) HTML controllers
    C) Frames
    D) Content Controllers
    Show Answer

    Answer: Option A
    Solution: Editable template regions control which areas of a template-based page a user can edit.


    Q 28. Blue Griffon is based on ________ rendering engine
    A) WebKit
    B) Gecko
    C) Presto
    D) None of the mentioned
    Show Answer

    Answer: Option B
    Solution: BlueGriffon is a new WYSIWYG content editor for the World Wide Web. Powered by Gecko, the rendering engine of Firefox, it�s a modern and robust solution to edit Web pages in conformance to the latest Web Standards.


    Q 29. Swapping images in dreamweaver is best if
    A) The images are the same �Mime� type
    B) The images are the same color
    C) The images are the same size
    D) You use the �Constrain� tool
    Show Answer

    Answer: Option C
    Solution: It helps the transition when compressing the image.


    Q 30. Choose the inappropriate option with respect to Blue Griffon 1.5.2. Blue Griffon
    A) includes tools for developing HTML5 pages
    B) abstracts out many css3 effects
    C) supports direct embedding of audio and video files
    D) supports swapping of videos of any length
    Show Answer

    Answer: Option D
    Solution: This feature is not provide by the editor.


    Q 31. State true or false. Maqetta is an open source initiative of the Dojo Foundation to geared towards visual designers through a WYSIWYG user interface.
    A) True
    B) False
    Show Answer

    Answer: Option A
    Solution: Maqetta is an open source initiative of the Dojo Foundation to build an HTML5-based editor geared towards visual designers through a WYSIWYG user interface.


    Q 32. Choose the correct statement for HTML
    A) Exo is a cloud-based ide that offers collaboration and deployment features
    B) Exo does not support java and python
    C) Exo supports javascript and html5
    D) Both a and c
    Show Answer

    Answer: Option D
    Solution: Exo provides a free, cloud-based IDE that offers collaboration and deployment features. In addition to HTML5 and JavaScript, it supports the development of Java, Ruby, and Python applications.


    Q 33. Which of following statement is true?
    i. Cloud9 has gained particular interest for its integration with GitHub and Bit Bucket authentication integration and real-time collaboration.
    ii. Cloud9 does not account for SSH and FTP access.

    A) ii
    B) i
    C) i and ii
    D) None of the mentioned
    Show Answer

    Answer: Option B
    Solution: Cloud9 allows for SSH and FTP access and capabilities to work offline.


    Q 34. Which of the following is not a web server?
    A) Apache tomcat
    B) BlueGriffon
    C) Jetty
    D) Tornado
    Show Answer

    Answer: Option B
    Solution: BlueGriffon is an IDE.


    Q 35. State true or false. Tomcat is an open source web server that provides a servlet container allowing you to run Java code.
    A) True
    B) False
    Show Answer

    Answer: Option A
    Solution: The answer is self explanatory.


    Q 36. LightTPD is not used by
    A) You Tube
    B) Wikipedia
    C) Meebo
    D) LocalHost
    Show Answer

    Answer: Option D
    Solution: LighTPD is an open source web server, designed and optimized for high performance environments.


    Q 37. Which of the following is not a prepackaged server stack?
    A) WAMP
    B) XAAMP
    C) MAMP
    D) None of the mentioned
    Show Answer

    Answer: Option B
    Solution: XAMPP is prepackaged stack.


    Q 38. Which of the following is not a channel of mozilla?
    A) Firefox
    B) Firefox alpha
    C) Firefox Beta
    D) Firefox Aurora
    Show Answer

    Answer: Option B
    Solution: The answer is self explanatory.


    Q 39. State true or false. Google Chrome has its own task manager, which allows you to view and manage your memory and CPU usage�
    A) True
    B) False
    Show Answer

    Answer: Option A
    Solution: The answer is self explanatory.


    Q 40. Which of the following are automatically loaded and operates as a part of browser?
    A) Add-ons
    B) Plug-ins
    C) Utilities
    D) Widgets
    Show Answer

    Answer: Option B
    Solution: Plugin programs are automatically loaded and operates as a part of browser.


    Q 41. Which of the following allows user to view a webpage?
    A) Operating System
    B) Website
    C) Interpreter
    D) Internet Browser
    Show Answer

    Answer: Option B
    Solution: The answer is self explanatory.


    Q 42. What is DOM in HTML?
    A) Hierarchy of objects in ASP.NET
    B) Application programming interface
    C) Convention for representing and interacting with objects in html documents
    D) None of the mentioned
    Show Answer

    Answer: Option C
    Solution: The Document Object Model (DOM) is a cross-platform and language-independent convention for representing and interacting with objects in HTML, XHTML, and XML documents.


    Q 43. This is used to

    A) make web page compatible only with IE8
    B) mimic behaviour of IE8
    C) make web page incompatible only with IE8
    D) None of the mentioned
    Show Answer

    Answer: Option B
    Solution: It provides fallback for IE8.


    Q 44. Which one of the following is an open source JavaScript library that enables styling for HTML5 elements in versions of Internet Explorer before IE 9 ?
    A) HTML5
    B) HTML5 Shiv
    C) HTML5 Shim
    D) None of the mentioned
    Show Answer

    Answer: Option B
    Solution: HTML5 Shiv is a JavaScript workaround, invented by Sjoerd Visscher, to enable styling of HTML5 elements in versions of Internet Explorer prior to version 9, which do not allow unknown elements to be styled without JavaScript.


    Q 45. Which one of the following is not a step to install a library you need to perform the compatibility in browsers ?
    A) Download the library from the github location
    B) Uncompress the file
    C) Insert the following code inside the head tag
    D) None of the mentioned
    Show Answer

    Answer: Option D
    Solution: All steps are required.


    Q 46. Which property is used to detect the browser�s user agent and code based on the pertinent cases?
    A) navigator.userAgent
    B) navigator.user
    C) navigator
    D) return
    Show Answer

    Answer: Option A
    Solution: An old strategy was to look at the property navigator.userAgent to detect the browser�s user agent and code based on the pertinent cases.


    Q 47. Some users have requested tests for IE�s float double margin bug, and support for position:fixed. Which API is suitable for them?
    A) mq() media Plugin API
    B) addTest() Plugin API
    C) testAllProps() Plugin API
    D) none of the mentioned
    Show Answer

    Answer: Option B
    Solution: A custom plug-in uses code that you write and attach to a load test or a Web performance test.


    Q 48. ___________ is an open source JavaScript library that allows support for different levels of experiences based on the capabilities of each browser.
    A) Navigator
    B) Modernizr
    C) Geolocation
    D) Google API
    Show Answer

    Answer: Option B
    Solution: Modernizr is an open source JavaScript library that allows support for different levels of experiences based on the capabilities of each browser using a simple feature detection model.


    Q 49. ____________ allows you to add custom styles to the document and test an element afterwards.
    A) hasEvent()
    B) testAllProps()
    C) testProp()
    D) modernizr.testStyles()
    Show Answer

    Answer: Option D
    Solution: Modernizr.testStyles() allows you to add custom styles to the document and test an element afterwards. An element with the id of �modernizr� is injected into the page.


    Q 50. Modernizr does actually add missing functionalities to browsers save for the HTML5 tags styling support.
    A) True
    B) False
    Show Answer

    Answer: Option B
    Solution: Modernizr, in spite of its name, does not actually add missing functionalities to browsers save for the HTML5 tags styling support.


    Q 51. ___________ is used to test whether geolocation is supported in old browsers.
    A) Modernizr
    B) Modernizr.geolocation
    C) Navigator.userAgent
    D) Modernizr.js
    Show Answer

    Answer: Option C
    Solution: Since Modernizr is a JavaScript object with methods, we can use Modernizr.geolocation to test whether geolocation is supported.


    Q 52. ____________ is a resource loader (CSS and JavaScript) that was made to specifically to work side-by-side with Modernizr.
    A) HasEvent()
    B) Navigator.userAgent
    C) Modernizr.load
    D) None of the mentioned
    Show Answer

    Answer: Option C
    Solution: Modernizr.load is optional in your build, but if you are loading polyfills, there�s a good chance it can save you some bandwidth and boost performance a bit.


    Q 53. In case we want to implement a JavaScript fallback, we would need to create a conditional statement using Modernizr.
    A) True
    B) False
    Show Answer

    Answer: Option A
    Solution: Modernizr is a JavaScript library that detects which HTML5 and CSS3 features your visitor�s browser supports.


    Q 54. Metadata store information about the web page that is not necessarily visible to end users.
    A) True
    B) False
    Show Answer

    Answer: Option A
    Solution: Meta tags store information about the web page�known as metadata that is not necessarily visible to end users (unless you reveal the page source code).


    Q 55. In which part of the HTML metadata is contained?
    A) body tag
    B) html tag
    C) head tag
    D) title tag
    Show Answer

    Answer: Option C
    Solution: Metadata is data (information) about data. The meta tag provides metadata about the HTML document. Metadata will not be displayed on the page, but will be machine parsable.


    Q 56. Which of the following is not a function of robots meta tag?
    A) noindex
    B) nofollow
    C) norepeat
    D) noarchive
    Show Answer

    Answer: Option C
    Solution: Valid values for the �CONTENT� attribute are: �INDEX�, �NOINDEX�, �FOLLOW�, �NOFOLLOW�.


    Q 57. What is the role of charset attribute? It specifies
    A) a scheme to be used to interpret the value of the content attribute
    B) a name for the metadata
    C) the character encoding for the HTML document
    D) none of the mentioned
    Show Answer

    Answer: Option C
    Solution: The charset is used to provide the character support.


    Q 58. __________ prevents the page from being indexed altogether.
    A) noarchive
    B) nofollow
    C) noindex
    D) novalue
    Show Answer

    Answer: Option C
    Solution: The noindex value of an HTML robots meta tag requests that automated Internet bots avoid indexing a web page.


    Q 59. Which of the following is not supported in HTML5 ?
    A) scheme
    B) content
    C) http-equiv
    D) name
    Show Answer

    Answer: Option A
    Solution: All other options are supported in HTML5 except option a.


    Q 60. __________ prevents search engines from following links inside the page
    A) noarchive
    B) nofollow
    C) noindex
    D) novalue
    Show Answer

    Answer: Option B
    Solution: nofollow is a value that can be assigned to the rel attribute of an HTML a element to instruct some search engines that a hyperlink should not influence the link target�s ranking in the search engine�s index.


    Q 61. Different meta tags are defined by changing the __________ attribute to a valid value.
    A) scheme
    B) content
    C) http-equiv
    D) name
    Show Answer

    Answer: Option D
    Solution: The name attribute specifies a name for the information/value of the content attribute.


    Q 62. __________ prevents search engines from showing a cached link for the page.
    A) nobot
    B) nofollow
    C) noarchive
    D) nosearch
    Show Answer

    Answer: Option C
    Solution: noarchive helps block search indexing with meta tags.


    Q 63. The value of the ___________ attribute refers to the time interval in seconds before the refresh is performed.
    A) scheme
    B) content
    C) http-equiv
    D) name
    Show Answer

    Answer: Option B
    Solution: The metadata can be used by browsers (how to display content or reload page), search engines (keywords), or other web services.


    Q 64. __________ is an HTML specification used to add more information to HTML tags.
    A) Macrodata
    B) Microdata
    C) Minidata
    D) Modifydata
    Show Answer

    Answer: Option B
    Solution: The Microdata spec provides a standardized syntax for additional semantic markup to your web pages to enhance the machine readability of your web pages.


    Q 65. The microdata model consists of groups of name-value pairs known as
    A) Item
    B) Property
    C) Value
    D) URL
    Show Answer

    Answer: Option A
    Solution: The microdata model consists of groups of name-value pairs known as items. Each group is known as an item. Each item can have item types, a global identifier (if the vocabulary specified by the item types support global identifiers for items), and a list of name-value pairs.

    If you like CBSEToaday and would like to contribute, you can also write an article using submit article or mail your article to contribute@cbsetoday.com See your article appearing on the cbsetoday.com main page and help other students/teachers.