feat(curriculum): Added Set 4 of Basic HTML Quiz Questions (#58971)

Co-authored-by: Jessica Wilkins <67210629+jdwilkin4@users.noreply.github.com>
This commit is contained in:
Arman Tiwari
2025-03-03 20:16:48 +05:30
committed by GitHub
parent 9cb6677e9f
commit 193bb11e5c

View File

@@ -1373,3 +1373,464 @@ Which of the following elements should NOT be placed inside of the `head`?
`img`
## --quiz--
### --question--
#### --text--
Which of the following is NOT a correct statement about absolute and relative paths?
#### --distractors--
Absolute paths start from the root directory, while relative paths depend on the location of the current file.
---
Relative paths are shorter and more flexible for linking within a website, while absolute paths include the full URL.
---
Both absolute and relative paths can be used to link to files within the same website.
#### --answer--
Relative paths cannot use .. to move up directories, but absolute paths can.
### --question--
#### --text--
Which of the following is NOT a valid target attribute value in an `a` tag?
#### --distractors--
`_self`
---
`_parent`
---
`_top`
#### --answer--
`_main`
### --question--
#### --text--
What is the purpose of the `controls` attribute in the `audio` element?
#### --distractors--
It defines the audio file format for the browser to use.
---
It automatically starts the audio when the page loads.
---
It specifies the audio files source URL.
#### --answer--
It adds built-in playback controls like play, pause, and volume adjustment.
### --question--
#### --text--
Which of the following elements improves SEO by providing a brief description of the web page?
#### --distractors--
```html
<meta
description="describe"
content="Discover expert tips and techniques for gardening in small spaces, choosing the right plants, and maintaining a thriving garden."
/>
```
---
```html
<meta
name="desc"
content="Discover expert tips and techniques for gardening in small spaces, choosing the right plants, and maintaining a thriving garden."
/>
```
---
```html
<meta
description="description"
content="Discover expert tips and techniques for gardening in small spaces, choosing the right plants, and maintaining a thriving garden."
/>
```
#### --answer--
```html
<meta
name="description"
content="Discover expert tips and techniques for gardening in small spaces, choosing the right plants, and maintaining a thriving garden."
/>
```
### --question--
#### --text--
What does `<meta charset="utf-8" />` do?
#### --distractors--
Sets the language of the webpage to English.
---
Links an external CSS stylesheet.
---
Specifies the title of the webpage.
#### --answer--
Defines the character encoding to ensure proper text display.
### --question--
#### --text--
What is the difference between `link` and `script` elements in HTML?
#### --distractors--
`link` is for JavaScript files, and `script` is for CSS files.
---
Both `link` and `script` are used to style web pages.
---
`script` is for adding styles, and `link` is for running JavaScript.
#### --answer--
`link` is used to add styles from an external CSS file, while `script` is used to run JavaScript code.
### --question--
#### --text--
Which of the following statements about HTML classes and IDs is incorrect?
#### --distractors--
A class name can be used multiple times throughout an HTML document.
---
The `rel` attribute defines the relationship between the linked resource and the HTML document.
---
The `og:image` property is used to specify the image displayed in social media posts.
#### --answer--
ID names cannot contain underscores and must be unique.
### --question--
#### --text--
Which of the following statements about HTML heading elements is true?
#### --distractors--
The text size increases from `h1` to `h6`.
---
The text size remains the same for all heading elements.
---
`h3` is larger than `h2`.
#### --answer--
The text size decreases from `h1` to `h6`.
### --question--
#### --text--
Which statement is incorrect about HTML elements?
#### --distractors--
HTML elements are the basic building blocks of a webpage.
---
Some codebases include a forward slash (/) inside void elements.
---
A boolean attribute is one that works simply by being present or absent in a tag.
#### --answer--
Void elements contain content and only have a start tag.
### --question--
#### --text--
Which of the following statements about void elements in HTML is true?
#### --distractors--
A void element must always include a forward slash / before closing.
---
A void element should never include a forward slash /.
---
The forward slash / is mandatory for self-closing void elements in all versions of HTML.
#### --answer--
Both `<img>` and `<img/>` are acceptable in modern HTML.
### --question--
#### --text--
What is the primary purpose of comments in programming?
#### --distractors--
To make the code run faster.
---
To change how the browser displays content.
---
To store temporary data within the code.
#### --answer--
To leave notes for yourself and other developers in the code.
### --question--
#### --text--
Which target attribute opens a link in the same browsing context as the current one?
#### --distractors--
`_blank`
---
`_top`
---
`_parent`
#### --answer--
`_self`
### --question--
#### --text--
What is the purpose of the `em` element in HTML?
#### --distractors--
To make text bigger.
---
To change the text color.
---
To underline words for emphasis.
#### --answer--
To highlight important text by making it italic.
### --question--
#### --text--
What does the `strong` element do in HTML?
#### --distractors--
Increases the font size.
---
Changes the text color.
---
Underlines the text.
#### --answer--
Makes text bold to show importance.
### --question--
#### --text--
What is the main difference between the `figure` and `figcaption` elements in HTML?
#### --distractors--
`figure` is used for captions, while `figcaption` is used to group related content like images or diagrams.
---
`figcaption` must always be placed outside the `figure` element.
---
There is no difference; both are used for the same purpose.
#### --answer--
`figure` groups related content like images or diagrams, while `figcaption` provides a caption for that content
### --question--
#### --text--
Why are HTML entities used?
#### --distractors--
To add styling to text.
---
To create hyperlinks in a webpage.
---
To increase the font size of special characters.
#### --answer--
To represent reserved characters like `<` and `&` in HTML.
### --question--
#### --text--
Which of the following statements about Open Graph tags is correct?
#### --distractors--
Open Graph tags are used to style a webpage with CSS.
---
Open Graph tags are only used for SEO and have no effect on social media.
---
Open Graph tags must be placed inside the `body` section of HTML.
#### --answer--
The `og:title` property sets the title that appears when content is shared on social media.
### --question--
#### --text--
Which of the following statements about image formats is incorrect?
#### --distractors--
WEBP and AVIF are better for modern image optimization.
---
SVG images can scale without losing quality.
---
Compression helps reduce image file sizes.
#### --answer--
PNG and JPG are the best formats for optimized images today.
### --question--
#### --text--
What does the `loop` attribute do in the `audio` element?
#### --distractors--
Plays the audio once.
---
Stops the audio after one play.
---
Slows down the audio playback.
#### --answer--
Repeats the audio continuously.
### --question--
#### --text--
Which of the following best describes an HTML boilerplate?
#### --distractors--
A special tool used by web developers to add watermarks to documents.
---
A browser plugin that speeds up webpage loading.
---
A coding framework exclusively for animations in HTML.
#### --answer--
A predefined template containing essential HTML structure for web development.