Which HTML element should be used to reference the source of a quotation when it is not part of the surrounding text?
The element is used to reference the source of a quotation in HTML. It provides a way to associate a quotation with its source or origin, especially when the citation is not a part of the main text.
The _______ CSS property is used to manipulate the display of quotation marks in q elements.
- quotation-display
- quote-mark
- quote-style
- quotes
The quotes CSS property is used to specify the type of quotation marks for embedded quotations. This is useful when customizing the type of quotation marks that appear before and after a
element. For instance, different languages and cultures use different styles of quotation marks, and this property helps in tailoring the appearance of the content according to the target audience.
Which tag is used to define the body of the HTML document?
-
The tag is used to define the main content of the HTML document. Everything that appears between the opening and closing tags will be displayed in the main browser window. This is where all the content, like text, images, links, and more, is placed.
An unordered list is created using the _____ tag.
An unordered list, which represents a list of items in no particular order, is created using the
- tag in HTML. Each item in this list is defined with the
- tag. The output is typically rendered as bullet points.
How can the nth-child pseudo-class selector be used to style table rows?
- To select and style the first row of a table.
- To style every nth-row in a table.
- To style rows based on their child elements.
- To style the table header only.
The :nth-child() pseudo-class selector in CSS is used to match elements based on their position in a group of siblings. In the context of table rows (
elements), it can be employed to apply styles to every nth-row. For example, tr:nth-child(even) { background-color: #f2f2f2; } will apply a background color to every even row in a table, creating a zebra-stripe effect.
How do you ensure that an image maintains its aspect ratio when resized?
- Set the max-width property to 100%.
- Use a fixed width and height in pixels.
- Use the aspect-ratio CSS property.
- Use the width attribute and leave the height attribute unset (or vice versa).
Ensuring an image maintains its aspect ratio when resized is critical for consistent design and user experience. By setting only one dimension (either width or height) and leaving the other unset, the browser will automatically scale the unset dimension proportionally, preserving the image's original aspect ratio.
To pre-select an option in the dropdown list, use the ______ attribute.
- default
- checked
- select
- selected
The selected attribute is used within the
The ______ tag is utilized to create a bulleted list within the HTML body.
The
- tag stands for "unordered list" and is used to create a list of items with bullet points. Each individual item within this list is marked by the
- (list item) tag. The
- represents the entire list structure, while
- represents each point.
What is the significance of the type attribute in a source tag within an audio or video tag?
- It defines the media file's MIME type.
- It provides an alternative text for the media.
- It sets the autoplay behavior.
- It specifies the order of playback.
The type attribute in a source tag within an audio or video tag specifies the media file's MIME type, such as "video/mp4" or "audio/mp3". This informs the browser about the file format and potentially helps it select the most appropriate source when there are multiple source tags provided. This enhances compatibility as different browsers may support different file formats.