What HTML element is used to define emphasized text?
Correct answer:
A) <em>
Explanation: The <em> tag is used to emphasize text, which typically renders in italic to indicate importance.
What HTML element is used to define emphasized text?
Correct answer:
A) <em>
Explanation: The <em> tag is used to emphasize text, which typically renders in italic to indicate importance.
Which HTML element is used to create a hyperlink?
Correct answer:
A) <a>
Explanation: The <a> tag is used to define hyperlinks in HTML, with the href attribute specifying the URL.
Which of the following opens a link in a new tab or browser window?
Correct answer:
C) <a href=”url” target=”_blank”>
Explanation: The target="_blank" attribute in the <a> tag opens the link in a new tab or window.
Which HTML elements are used to create a table?
Correct answer:
B) <table>, <tr>, <td>
Explanation: The core elements used to create a table in HTML are <table> (table), <tr> (table row), and <td> (table data/cell).
True or False: Inline elements are normally displayed without starting a new line.
Correct answer:
A) True
Explanation: Inline elements, such as <span> , do not create a new line; they only take up as much width as required by their content.
How do you create a numbered list in HTML?
Correct answer:
B) <ol>
Explanation: The <ol> tag is used to create an ordered (numbered) list in HTML.
How do you create a bulleted list in HTML?
Correct answer:
B) <ul>
Explanation: The <ul> tag is used to create an unordered (bulleted) list.
What is the correct HTML for making a checkbox?
Correct answer:
A) <input type=”checkbox”>
Explanation: The correct syntax for creating a checkbox in HTML is by using <input type="checkbox"> .
How do you make a text input field in HTML?
Correct answer:
A) <input type=”text”>
Explanation: The <input type="text"> element is used to create a single-line text input field.
Which HTML element is used to create a drop-down list?
Correct answer:
A) <select>
Explanation: The <select> element is used to create a drop-down list, with <option> elements defining each selectable item.
What is the correct HTML for creating a text area?
Correct answer:
A) <textarea>
Explanation: The <textarea> element is used to create a multi-line text input field.
What is the correct HTML for inserting an image?
Correct answer:
C) <img src=”image.gif” alt=”MyImage”>
Explanation: The <img> tag is used to insert an image, with src specifying the image source and alt providing alternative text.
What is the correct HTML for inserting a background image?
Correct answer:
B) <body style=”background-image:url(‘background.gif’);”>
Explanation: The background-image CSS property is used within the style attribute to apply a background image to an HTML element.
True or False: An <iframe> is used to display a webpage within a webpage.
Correct answer:
A) True
Explanation: The <iframe> element is used to embed another HTML page within the current page.
True or False: Block elements are normally displayed without starting a new line.
Correct answer:
B) False d) Type, action, enctype, method, value
Explanation: Block elements, such as <div> , always start on a new line and take up the full width available.
Which HTML attribute specifies an alternate text for an image if the image cannot be displayed?
Correct answer:
B) Alt
Explanation: The alt attribute provides alternative text for an image if it cannot be displayed.
Which of the following is the correct doctype for HTML5?
Correct answer:
A) <!DOCTYPE html>
Explanation: HTML5 uses the simplified <!DOCTYPE html> declaration.
Which HTML element is used to specify a footer?
Correct answer:
B) <footer>
Explanation: The <footer> element is used to define the footer section of a document or section.
True or False: In HTML, you can embed SVG elements directly into an HTML page.
Correct answer:
A) True
Explanation: SVG (Scalable Vector Graphics) can be directly embedded within HTML to create scalable images.
Which HTML element is used to play video files?
Correct answer:
C) <video>
Explanation: The <video> element is used to embed video content into a webpage.
Which HTML element is used to play audio files?
Correct answer:
A) <audio>
Explanation: The <audio> element is used to embed audio content into a webpage.
Which HTML global attribute is used to specify whether the content of an element should be editable?
Correct answer:
B) Contenteditable
Explanation: The contenteditable attribute allows elements to be editable directly in the browser.
In HTML, which event attributes are used to handle form input?
Correct answer:
A) Onblur and onfocus
Explanation: The onblur and onfocus event attributes are used to handle focus events for form inputs.
Graphics defined by SVG are in which format?
Correct answer:
A) XML
Explanation: SVG graphics are defined using XML, which allows them to be scalable without losing quality.
Which HTML element is used to draw graphics via scripting?
Correct answer:
A) <canvas>
Explanation: The <canvas> element is used to draw graphics dynamically via JavaScript.
In HTML, which attribute is used to specify that an input field must be filled out?
Correct answer:
A) Required
Explanation: The required attribute makes an input field mandatory before form submission.
Which input type defines a slider control?
Correct answer:
A) Range
Explanation: The range input type allows the user to select a value from a predefined range using a slider.
Which HTML element is used to display a scalar measurement within a range?
Correct answer:
A) <meter>
Explanation: The <meter> element is used to represent scalar values within a known range, such as disk usage.
Which HTML element defines navigation links?
Correct answer:
A) <nav>
Explanation: The <nav> element is used to define a section of navigation links in a webpage.
Which HTML element is used to define content aside from the main content of the page?
Correct answer:
C) <aside>
Explanation: The <aside> element is used to define content related to the main content but placed to the side, like a sidebar.
Which HTML element is used to contain meta tags, links to style sheets, and the title element?
Correct answer:
D) <head>
Explanation: The <head> element contains metadata, links to styles, and other important non-visible content.
Which HTML declaration identifies the version of HTML used to create a webpage?
Correct answer:
C) <!DOCTYPE>
Explanation: The <!DOCTYPE> declaration informs the browser of the HTML version being used.
Which HTML element is used to specify information about the document, such as character set or viewport?
Correct answer:
A) <meta>
Explanation: The <meta> element provides metadata, such as charset, author, or viewport settings for a document.
Which HTML element contains the entire document code?
Correct answer:
C) <html>
Explanation: The <html> element wraps all the content of an HTML document.
Which HTML element identifies the document title?
Correct answer:
C) <title>
Explanation: The <title> element is used to specify the title of the document, which appears in the browser tab.
Which HTML element contains all visible webpage content?
Correct answer:
D) <body>
Explanation: The <body> element contains all the visible content of a webpage.
True or False: HTML comments should be used to inform others about important elements used within webpage code.
Correct answer:
A) True
Explanation: HTML comments ( <!-- comment --> ) are helpful for explaining code or giving instructions to developers.
True or False: HTML comments should be used to ensure that the addition of random whitespace will not affect rendering in browsers.
Correct answer:
B) False
Explanation: Whitespace management is handled by the browser automatically, and comments should not be used for this purpose.
True or False: HTML comments can be used to remind yourself why you inserted a particular piece of code.
Correct answer:
A) True
Explanation: Comments are commonly used to leave notes or explanations in the code for future reference.
True or False: HTML comments can be used to disable code to see how a page will appear without a particular markup element.
Correct answer:
A) True
Explanation: Developers often use comments to temporarily disable code and observe how the page behaves without it.
Which of the following are examples of void (empty) elements in HTML?
Correct answer:
A) <br>, <hr>, <img>, <meta>
Explanation: Void elements, such as <br> and <img> , do not require closing tags.
Which of the following defines the minimal parts of an HTML document according to the HTML Living Standard?
Correct answer:
A) <!DOCTYPE html>, <html>, <head>, <meta>, <title>, <body>
Explanation: These are the minimal components required for a valid HTML document.
True or False: To see how a webpage is constructed, a user can view the page source in the browser.
Correct answer:
A) True
Explanation: Most browsers allow users to view the HTML source of a webpage through the "View Page Source" or "Inspect" options.
What is a deprecated feature in web development?
Correct answer:
B) A part of a language officially discouraged because better features exist
Explanation: Deprecated features are discouraged for use because more modern alternatives are available.
True or False: Whitespace is an unprinted character such as the spaces between words and lines of text.
Correct answer:
A) True
Explanation: Whitespace refers to unprinted characters like spaces, tabs, and new lines in the document.
True or False: Good practice is to use the <br> element to add space or control formatting of a webpage.
Correct answer:
B) False
Explanation: The <br> element should only be used for line breaks. CSS should be used to control spacing and formatting.
True or False: The <br> tag has a closing tag.
Correct answer:
B) False
Explanation: The <br> tag is a self-closing or void element and does not require a closing tag
How many heading element tags are there in HTML?
Correct answer:
B) 6
Explanation: HTML has six heading elements: <h1> to <h6> .
Which HTML element should be nested within an <ul> or <ol> element for each list item?
Correct answer:
A) <li>
Explanation: The <li> tag is used to define list items in both ordered and unordered lists.
True or False: An ordered list ( <ol> ) should be used for a bulleted list of items.
Correct answer:
B) False
Explanation: An ordered list ( <ol> ) creates a numbered list, while a bulleted list is created with an unordered list ( <ul> ).
If this exam is giving you a hard time, let us be your helping hand. Contact us, and we'll provide the assistance you need to pass and move forward.