Which HTML element is used to define a table header in a table?
Correct answer:
B) <th>
Explanation: The <th> element is used to define header cells in a table, which are often bold and centered.
Which HTML element is used to define a table header in a table?
Correct answer:
B) <th>
Explanation: The <th> element is used to define header cells in a table, which are often bold and centered.
Which attribute of the <img> tag specifies alternative text for an image?
Correct answer:
B) alt
Explanation: The alt attribute provides alternative text for an image if it cannot be displayed.
Which HTML element is used to define an unordered list?
Correct answer:
B) <ul>
Explanation: The <ul> element defines an unordered list, where items are typically marked with bullet points.
Which HTML element is used to create a drop-down list?
Correct answer:
B) <select>
Explanation: The <select> element is used to create a drop-down list in HTML, often in combination with <option> elements.
What is the purpose of the <fieldset> element in HTML forms?
Correct answer:
A) To group related form controls
Explanation: The <fieldset> element is used to group related form elements together for better structure and clarity.
Which tag is used to define a scalar measurement within a known range in HTML?
Correct answer:
A) <meter>
Explanation: The <meter> tag represents a scalar measurement within a known range, such as disk usage or progress percentage.
Which attribute is used to associate a label with a form control in HTML?
Correct answer:
B) for
Explanation: The for attribute in the <label> tag is used to associate the label with a specific form element by matching the form control's id attribute.
Which HTML attribute specifies that an input field must be filled out before submitting a form?
Correct answer:
A) required
Explanation: The required attribute ensures that the user must complete the input field before submitting the form.
Which <input> type is used for entering a phone number in HTML5?
Correct answer:
B) tel
Explanation: The <input type="tel"> is used for collecting phone numbers, ensuring the correct format for the input.
Which HTML5 element is used to define navigation links?
Correct answer:
A) <nav>
Explanation: The <nav> element is used to group a set of navigation links within a webpage.
Which HTML element defines content that is not directly related to the main content but is placed alongside it?
Correct answer:
A) <aside>
Explanation: The <aside> element is used for content that is related to the main content but placed separately, like a sidebar.
How do you create a hyperlink that opens in a new browser tab or window in HTML?
Correct answer:
B) <a href="url" target="_blank">
Explanation: The target="_blank" attribute opens the linked document in a new tab or window.
Which HTML5 element is used for embedding audio content on a webpage?
Correct answer:
B) <audio>
Explanation: The <audio> tag is used to embed sound content, such as music or podcasts, into a webpage.
Which HTML5 tag is used to embed video files in a webpage?
Correct answer:
C) <video>
Explanation: The <video> tag is used to embed video content directly in a webpage, often with controls like play, pause, and volume.
Which attribute is required in the <img> tag to display an image?
Correct answer:
A) src
Explanation: The src attribute specifies the image source URL, and it is required to display the image.
Which HTML5 tag specifies a self-contained composition in a document?
Correct answer:
B) <article>
Explanation: The <article> tag defines a self-contained, independent piece of content, such as a blog post or news article.
Which CSS selector is used to apply styles to the first child of an element?
Correct answer:
B) :first-child
Explanation: The :first-child selector targets the first child element of its parent in CSS.
Which CSS selector selects elements with an attribute and specific value?
Correct answer:
A) [attribute=value]
Explanation: The [attribute=value] selector selects elements with a specified attribute and value.
Which CSS property is used to change the font style of an element?
Correct answer:
B) font-style
Explanation: The font-style property is used to apply styles such as italic to the text.
What does the z-index property control in CSS?
Correct answer:
B) The stacking order of positioned elements
Explanation: The z-index property controls the stacking order of elements that overlap, with higher values placing elements on top.
Which CSS property is used to apply a shadow effect to an elements box?
Correct answer:
A) box-shadow
Explanation: The box-shadow property adds shadow effects around the border of an element.
What is the default position value for HTML elements in CSS?
Correct answer:
C) static
Explanation: The default position for elements in CSS is static, meaning they appear in the normal document flow.
Which CSS property can be used to create a smooth change from one style to another?
Correct answer:
B) transition
Explanation: The transition property allows for smooth changes when the value of a property changes, such as color or size.
What does the display:inline-block CSS property do?
Correct answer:
A) Displays the element as a block but with inline formatting
Explanation: The inline-block value allows an element to behave like a block-level element but remain inline within its parent container.
Which CSS property controls the visibility of an element without affecting layout?
Correct answer:
A) visibility
Explanation: The visibility property hides an element while keeping the space it occupies in the layout.
Which unit of measurement is relative to 1% of the viewport width?
Correct answer:
B) vw
Explanation: The vw unit represents 1% of the viewport width, making it responsive to screen size changes.
What does the :hover pseudo-class do in CSS?
Correct answer:
B) Targets the element when hovered over
Explanation: The :hover pseudo-class applies styles to an element when the user hovers over it with a pointer device.
Which CSS property controls how elements float?
Correct answer:
A) float
Explanation: The float property allows elements to be positioned left or right of their container, causing surrounding text to wrap around them.
Which CSS property allows you to apply multiple background images to an element?
Correct answer:
B) background-image
Explanation: The background-image property allows the use of multiple background images by separating the values with commas.
Which property is used to adjust the space between letters in CSS?
Correct answer:
A) letter-spacing
Explanation: The letter-spacing property is used to control the space between individual letters in a text.
What is the default value of the flex-direction property?
Correct answer:
A) row
Explanation: By default, the flex-direction property lays out items in a row, from left to right.
Which CSS property is used to round the corners of an elements border?
Correct answer:
B) border-radius
Explanation: The border-radius property is used to round the corners of an elements border.
Which HTML5 element is used to mark text that is important or highlighted?
Correct answer:
A) <mark>
Explanation: The <mark> element highlights important text by applying a yellow background color by default.
Which tag is used to create an inline container for applying styles in CSS?
Correct answer:
B) <span>
Explanation: The <span> tag is used to create an inline container for applying CSS styles or grouping inline elements.
What is the purpose of the <noscript> tag in HTML?
Correct answer:
A) To provide content for browsers that do not support JavaScript
Explanation: The <noscript> tag displays alternate content if the browser does not support or has JavaScript disabled.
Which attribute is used to specify a default value for an input element?
Correct answer:
C) value
Explanation: The value attribute specifies the default value for an <input> element.
What is the purpose of the autoplay attribute in the <audio> tag?
Correct answer:
B) To automatically play the audio file
Explanation: The autoplay attribute ensures the audio file starts playing automatically once the page is loaded.
Which CSS property is used to add space inside the border of an element?
Correct answer:
B) padding
Explanation: The padding property adds space inside the elements border, affecting the layout without moving the element.
Which CSS pseudo-class is used to apply styles to a link that has been visited?
Correct answer:
C) :visited
Explanation: The :visited pseudo-class applies styles to links that have been clicked by the user.
Which attribute is used to allow multiple file uploads in an HTML form?
Correct answer:
A) multiple
Explanation: The multiple attribute allows users to select and upload more than one file in an input form.
Which HTML tag is used to represent text that has been inserted into a document?
Correct answer:
A) <ins>
Explanation: The <ins> tag is used to represent inserted text, often shown with an underline.
Which HTML5 element represents the main content of a document?
Correct answer:
B) <main>
Explanation: The <main> element is used to contain the main content of a webpage, excluding headers, footers, and navigation.
What does the :nth-child pseudo-class do in CSS?
Correct answer:
C) Selects elements based on their order within their parent
Explanation: The :nth-child pseudo-class selects elements based on their position relative to their siblings in the DOM.
Which CSS property sets the height of an element's content area?
Correct answer:
A) height
Explanation: The height property defines the height of the content area of an element.
What does the @import rule in CSS do?
Correct answer:
A) Imports styles from another CSS file
Explanation: The @import rule allows you to import a stylesheet into another stylesheet.
Which HTML attribute is used to specify the URL of a video file in the <video> tag?
Correct answer:
A) src
Explanation: The src attribute specifies the source URL of a video file in the <video> tag.
What does the <q> element represent in HTML?
Correct answer:
B) A short inline quotation
Explanation: The <q> element is used to represent a short quotation within the text, rendered with quotation marks.
Which CSS property is used to align text within an element?
Correct answer:
A) text-align
Explanation: The text-align property aligns text horizontally within its containing element.
Which HTML element is used to group options in a drop-down list?
Correct answer:
A) <optgroup>
Explanation: The <optgroup> element groups related <option> elements within a <select> element.
What is the purpose of the for attribute in the <label> tag?
Correct answer:
A) To associate a label with a form control
Explanation: The for attribute links a label to a form control, ensuring the user knows which control the label is describing.
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.