Practice high-yield Programming & Software Development MCQs on Html5 — Part 2 with worked academic solutions for FPSC, PPSC, NTS, NITB, PTS.
Questions
40
Difficulty Level
Exam-Level
Target Exams
FPSC, PPSC, NTS...
Estimated Time
48 mins
Exam-Level FPSC PPSC NTS NITB PTS
Verified for Commission Syllabus • Oct 14, 2026
40
Verified Practice Questions
Interactive test mode with detailed academic worked solutions
Live Progress|0/40 answered
✓0 correct
✗0 wrong
0% score
🎉 Set complete! All 40 questions answered.
Question 1 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
The ___________ method must add the scaling transformation described by the arguments to the transformation matrix.
Correct Answer: Option A — scale(x, y)
Detailed Academic Explanation:
HTML5 canvas provides scale(x, y) method which is used to increase or decrease the units in our canvas grid.
💡Key Conceptual Anchor:Html5
Question 2 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Which method must clear the pixels in the specified rectangle that also intersects the current clipping region to a fully transparent black, erasing any previous image?
Correct Answer: Option B — clearRect(x, y, w, h)
Detailed Academic Explanation:
The clearRect() method clears the specified pixels within a given rectangle.
💡Key Conceptual Anchor:Html5
Question 3 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
When the _____________ method is passed an animated image as its image argument, the user agent must use the poster frame of the animation, or, if there is no poster frame, the first frame of the animation.
Correct Answer: Option C — drawImage()
Detailed Academic Explanation:
The drawImage() method draws an image, canvas, or video onto the canvas.
💡Key Conceptual Anchor:Html5
Question 4 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
The ____________ method must create a new clipping region by calculating the intersection of the current clipping region and the area described by the current path, using the non-zero winding number rule.
Correct Answer: Option C — clip()
Detailed Academic Explanation:
The clip() method clips a region of any shape and size from the original canvas.
💡Key Conceptual Anchor:Html5
Question 5 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
The ____________ method must fill all the subpaths of the current path, using fillStyle, and using the non-zero winding number rule.
Correct Answer: Option A — fill()
Detailed Academic Explanation:
The fill() method fills the current drawing (path).The default color is black.
💡Key Conceptual Anchor:Html5
Question 6 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Which of the following methods must empty the list of subpaths so that the context once again has zero subpaths?
Correct Answer: Option B — beginPath()
Detailed Academic Explanation:
The beginPath() method begins a path, or resets the current path.
💡Key Conceptual Anchor:Html5
Question 7 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
An API is an application programming interface consisting of methods and properties which allow the author to get or set data or execute commands to the user agent.
Correct Answer: Option A — True
Detailed Academic Explanation:
API, an abbreviation of application program interface, is a set of routines, protocols, and tools for building software applications.
💡Key Conceptual Anchor:Html5
Question 8 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Which of the following is not a type of attribute for input tag?
Correct Answer: Option A — day
Detailed Academic Explanation:
day is not defined in the pre-defined attribute list of input tag
💡Key Conceptual Anchor:Html5
Question 9 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
The new __________ element is supposed to represent some form of extra details, such as a tooltip or revealed region that may be shown to a user.
Correct Answer: Option C — details
Detailed Academic Explanation:
The details tag specifies additional details that the user can view or hide on demand. The details tag can be used to create an interactive widget that the user can open and close. Any sort of content can be put inside the <details> tag.
💡Key Conceptual Anchor:Html5
Question 10 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
The __________ element may contain not just links but also other interactive items, including the newly introduced command element.
Correct Answer: Option B — meter
Detailed Academic Explanation:
The menu tag defines a list/menu of commands. The menu tag is used for context menus, toolbars and for listing form controls and commands.
💡Key Conceptual Anchor:Html5
Question 11 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
The __________ attribute effectively renders the iframe as an inline include, which allows the parent document’s CSS to affect the contents of the iframe
Correct Answer: Option B — seamless
Detailed Academic Explanation:
The seamless attribute is a boolean attribute. When present, it specifies that the iframe should look like it is a part of the containing document (no borders or scrollbars).
💡Key Conceptual Anchor:Html5
Question 12 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Which of the following allows the sandboxed iframe to run scripts from the same domain?
Correct Answer: Option C — allow-scripts
Detailed Academic Explanation:
The sandbox attribute enables an extra set of restrictions for the content in the iframe.
💡Key Conceptual Anchor:Html5
Question 13 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
__________ allows the iframe to pull in content from elsewhere in the same domain.
Correct Answer: Option A — allow-same-origin
Detailed Academic Explanation:
It allows the iframe content to be treated as being from the same origin.
💡Key Conceptual Anchor:Html5
Question 14 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
All elements are identified by their __________ and are marked up using either start tags and end tags or self-closing tags
Correct Answer: Option B — tag name
Detailed Academic Explanation:
The tagName property returns the tag name of the element. In HTML, the returned value of the tagName property is always in UPPERCASE.
💡Key Conceptual Anchor:Html5
Question 15 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
The __________ element represents a span of text that is isolated from its surroundings for the purposes of bidirectional text formatting
Correct Answer: Option B — bdi
Detailed Academic Explanation:
bdi stands for Bi-directional Isolation. This element is useful when embedding user-generated content with an unknown directionality.
💡Key Conceptual Anchor:Html5
Question 16 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
The interactive element audio with the attribute controls must not appear as a descendant of which element?
Correct Answer: Option D — both a and b
Detailed Academic Explanation:
The anchor and the button tag acts as link which cannot be a parent of audio element.
💡Key Conceptual Anchor:Html5
Question 17 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
A ____________ element must have a start tag but must not have an end tag.
Correct Answer: Option B — command
Detailed Academic Explanation:
The command tag is new in HTML5 and specifies a normal command with an action.
💡Key Conceptual Anchor:Html5
Question 18 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Which type attribute of input element sets the element’s value to a string representing a number?
Correct Answer: Option A — range
Detailed Academic Explanation:
The input element with a type attribute whose value is “range” represents an imprecise control for setting the element’s value to a string representing a number.
💡Key Conceptual Anchor:Html5
Question 19 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Which of the following type attributes of input element defines control for entering a telephone number?
Correct Answer: Option B — tel
Detailed Academic Explanation:
The input element with a type attribute whose value is “tel” represents a one-line plain-text edit control for entering a telephone number.
💡Key Conceptual Anchor:Html5
Question 20 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Which element represents a control for generating a public-private key pair?
Correct Answer: Option B — keygen
Detailed Academic Explanation:
The keygen element represents a control for generating a public-private key pair and for submitting the public key from that key pair.
💡Key Conceptual Anchor:Html5
Question 21 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
The World Wide Web’s markup language has always been HTML.
Correct Answer: Option A — True
Detailed Academic Explanation:
The World Wide Web’s markup language has always been HTML. HTML was primarily designed as a language for semantically describing scientific documents, although its general design and adaptations over the years have enabled it to be used to describe a number of other types of documents.
💡Key Conceptual Anchor:Html5
Question 22 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Which element represents marked or highlighted text for reference purposes?
Correct Answer: Option B — mark
Detailed Academic Explanation:
The mark element represents a run of text in one document marked or highlighted for reference purposes, due to its relevance in another context.
💡Key Conceptual Anchor:Html5
Question 23 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Which element(s) represents a section of a document that links to other documents?
Correct Answer: Option C — nav
Detailed Academic Explanation:
The nav element represents a section of a page that links to other pages or to parts within the page: a section with navigation links.
💡Key Conceptual Anchor:Html5
Question 24 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Which of the following element marks the ruby text component of a ruby annotation?
Correct Answer: Option B — rt
Detailed Academic Explanation:
The rt element is the markup for ruby text.
💡Key Conceptual Anchor:Html5
Question 25 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Subtitle tracks and caption tracks to be specified for audio and video elements can be added using which of the following element?
Correct Answer: Option B — track
Detailed Academic Explanation:
The track element enables supplementary media tracks such as subtitle tracks and caption tracks to be specified for audio and video elements.
💡Key Conceptual Anchor:Html5
Question 26 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Which of the following is/are the property of SVG images?
Correct Answer: Option D — All of the mentioned
Detailed Academic Explanation:
Scalable Vector Graphics (SVG) is an XML-based vector image format for two-dimensional graphics with support for interactivity and animation.
💡Key Conceptual Anchor:Html5
Question 27 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
_______ drawings can be dynamic and interactive.
Correct Answer: Option B — SVG
Detailed Academic Explanation:
Scalable Vector Graphics (SVG) is an XML-based vector image format for two-dimensional graphics with support for interactivity and animation. The SVG specification is an open standard developed by the World Wide Web Consortium (W3C) since 1999. SVG images and their behaviors are defined in XML text files.
💡Key Conceptual Anchor:Html5
Question 28 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Which element must reference a resource that can provide an image for the cursor graphic?
Correct Answer: Option C — cursor
Detailed Academic Explanation:
The cursor attribute specifies the mouse cursor displayed when the mouse pointer is over an element. This attribute behaves exactly like the css cursor property except that if the browser supports the cursor element, you should be able to use it with the funciri notation.
💡Key Conceptual Anchor:Html5
Question 29 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Which element serves as a container for atomic filter operations.
Correct Answer: Option A — filter
Detailed Academic Explanation:
A filter is referenced by using the filter attribute on the target SVG element and is never renderd directly.
💡Key Conceptual Anchor:Html5
Question 30 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
The __________ element must reference either an ‘altGlyphDef’ element or a ‘glyph’ element.
Correct Answer: Option D — altGlyph
Detailed Academic Explanation:
The altGlyph element allows sophisticated selection of the glyphs used to render its child character data.
💡Key Conceptual Anchor:Html5
Question 31 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
The ___________ element must reference a ‘linearGradient’ or ‘radialGradient’ element.
Correct Answer: Option B — radialGradient
Detailed Academic Explanation:
radialGradient lets authors define radial gradients to fill or stroke graphical elements.
💡Key Conceptual Anchor:Html5
Question 32 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
SVG also stands for Scalar Vector Graphics
Correct Answer: Option B — False
Detailed Academic Explanation:
SVG stands for Scalable Vector Graphics
💡Key Conceptual Anchor:Html5
Question 33 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Which property of SVG restricts the region to which paint can be applied?
Correct Answer: Option B — clip-Path
Detailed Academic Explanation:
A clipping path is defined with a clipPath element. A clipping path is used/referenced using the clip-path property.
💡Key Conceptual Anchor:Html5
Question 34 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Which SVG element produces the same effect as if the nodes were deeply cloned into a non-exposed DOM?
Correct Answer: Option B — use
Detailed Academic Explanation:
The use element takes nodes from within the SVG document, and duplicates them somewhere else.
💡Key Conceptual Anchor:Html5
Question 35 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Which of the following attribute triggers event after the document is printed?
Correct Answer: Option C — onafterprint
Detailed Academic Explanation:
onafterprint − Triggers event after the document is printed.
💡Key Conceptual Anchor:Html5
Question 36 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the replacement for cookies in HTML5?
Correct Answer: Option C — Local Storage
Detailed Academic Explanation:
Local Storage is the correct answer to “What is the replacement for cookies in HTML5”. This question is standard in competitive examination syllabi for Html5.
💡Key Conceptual Anchor:Html5
Question 37 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
A semantic element clearly describes its meaning to
Correct Answer: Option C — Both A & B
Detailed Academic Explanation:
Both A & B is the correct answer to “A semantic element clearly describes its meaning to”. This question is standard in competitive examination syllabi for Html5.
💡Key Conceptual Anchor:Html5
Question 38 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Which is not suited for game applications?
Correct Answer: Option B — Svg
Detailed Academic Explanation:
Svg is the correct answer to “Which is not suited for game applications”. This question is standard in competitive examination syllabi for Html5.
💡Key Conceptual Anchor:Html5
Question 39 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
HTML5 features, include native audio and video support without the need for.
Correct Answer: Option A — Flash
Detailed Academic Explanation:
Flash is the correct answer to “HTML5 features, include native audio and video support without the need for.”. This question is standard in competitive examination syllabi for Html5.
💡Key Conceptual Anchor:Html5
Question 40 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Which attribute specifies that the video will be loaded at page load, and ready to run. Ignored if autoplay is present.
Correct Answer: Option C — preload
Detailed Academic Explanation:
preload is the correct answer to “Which attribute specifies that the video will be loaded at page load, and ready to run. Ignored if autoplay is present.”. This question is standard in competitive examination syllabi for Html5.
💡Key Conceptual Anchor:Html5
✓Link copied to clipboard
Continue Your Practice
Advance Html — Part 1
Master the next curriculum module with 40 exam-standard MCQs.
💡Examiner's Advisory for Programming & Software Development
In competitive commission exams (FPSC, PPSC, KPPSC, SPSC, CSS, PMS), questions are frequently phrased with distractor options designed to catch rote learners. Whenever you answer an MCQ, read the Detailed Academic Explanation and Conceptual Anchor to understand why the remaining options are incorrect.