Single Choice Question

  1. Which HTML tag is used to insert an image into a webpage?
    1. <img>
    2. <picture>
    3. <photo>
    4. <image>
  2. If we need to display the linked web page in a new browser tab, which value of the target attribute should be used?
    1. _self
    2. _own
    3. _blank
    4. _new 非标准输入
  3. What attribute specifies the source (URL) of an image in HTML?
    1. src
    2. url
    3. image
    4. source
  4. How do you specify the alternative text for an image in HTML?
    1. <img src="image.jpg" alt="Descriptive text">
    2. <img src="image.jpg" text="Descriptive text">
    3. <img src="image.jpg" name="Descriptive text">
    4. <img src="image.jpg" title="Descriptive text">
  5. Which HTML tag is used to embed a video into a webpage?
    1. <video>
    2. <movie>
    3. <clip>
    4. <media>
  6. What attribute is used to set the autoplay behavior for a video in HTML?
    1. autoplay
    2. play
    3. auto-play
    4. start
  7. How do you specify the source of a video file in an HTML <video> tag?
    1. <video src="movie.mp4"></video>
    2. <video file="movie.mp4"></video>
    3. <video><source src="movie.mp4"></video>
    4. <video>movie.mp4</video>
  8. What is the correct way to add multiple sources for a video to ensure compatibility across browsers?
    1. <video src="movie.mp4" src="movie.ogg"></video>
    2. <video><source src="movie.mp4" type="video/mp4"><source src="movie.ogg" type="video/ogg"></video>
    3. <video><source="movie.mp4" type="video/mp4"><source="movie.ogg" type="video/ogg"></video>
    4. <video src="movie.mp4" type="video/mp4"> movie.ogg </video>
  9. Which HTML tag is used to embed audio content into a webpage?
    1. <audio>
    2. <sound>
    3. <music>
    4. <melody>
  10. What attribute is used to control whether an audio file should start playing automatically when the page loads?
    1. auto-play
    2. autoplay
    3. play-on-load
    4. load-play
  11. How do you specify the source of an audio file in an HTML <audio> tag?
    1. <audio src="audio.mp3"></audio>
    2. <audio file="audio.mp3"></audio>
    3. <audio><source src="audio.mp3"></audio>
    4. <audio>audio.mp3</audio>
  12. Which attribute is used to add text that describes the audio content in an <audio> element?
    1. alt
    2. text
    3. description
    4. controls
  13. How do you add multiple sources for an audio file to ensure compatibility across browsers?
    1. <audio src="audio.mp3" src="audio.ogg"></audio>
    2. <audio><source src="audio.mp3" type="audio/mp3"><source src="audio.ogg" type="audio/ogg"></audio>
    3. <audio>audio.mp3 audio.ogg</audio>
    4. <audio src="audio.mp3" type="audio/mp3, audio/ogg"></audio>
  14. What HTML tag is used to create a hyperlink?
    1. <a>
    2. <link>
    3. <href>
    4. <url>
  15. What attribute specifies the destination URL for a hyperlink?
    1. url
    2. link
    3. href
    4. destination
  16. How do you create a hyperlink that opens in a new browser tab?
    1. <a href="https://example.com" target="_blank">Link</a>
    2. <a href="https://example.com" new-tab="true">Link</a>
    3. <a href="https://example.com" open-in-new-tab>Link</a>
    4. <a href="https://example.com" target="new">Link</a>
  17. What is the purpose of the title attribute in a hyperlink?
    1. To specify the target URL
    2. To add a tooltip when hovering over the link title 属性用来提供一个额外的说明文本,通常当鼠标悬停在链接上时会以 工具提示(tooltip) 的形式显示
    3. To define the link's importance
    4. To control how the link opens (e.g., new tab)
  18. How do you create a link that navigates to an email address, causing the user's default email client to open with a pre-filled recipient?
    1. <a href="mailto:someone@example.com">Email Us</a>
    2. <a email="someone@example.com">Email Us</a>
    3. <a send-to="someone@example.com">Email Us</a>
    4. <a href="email:someone@example.com">Email Us</a>
  19. What is the difference between a relative URL and an absolute URL in hyperlinks?
    1. Relative URLs start with "http://" or "https://", while absolute URLs do not.
    2. Absolute URLs specify the full path to the resource, while relative URLs are specific to the current document's location.
    3. Relative URLs are faster to load than absolute URLs.
    4. Absolute URLs are only used for external links, while relative URLs are only for internal links. 一些项目也会使用绝对URL来链接同站资源。
  20. How do you create a link that, when clicked, downloads a file instead of navigating to it?
    1. <a href="file.pdf" download>Download File</a>
    2. <a href="file.pdf" save-as="file.pdf">Download File</a>
    3. <a href="file.pdf" action="download">Download File</a>
    4. <a href="file.pdf" download="file.pdf">Download File</a>
  21. What is the difference between the href and src attributes in HTML?
    1. href is used for images and videos, while src is used for hyperlinks.
    2. href specifies the destination URL for hyperlinks, while src specifies the source URL for images, videos, and other embedded content.
    3. Both href and src can be used interchangeably for all types of resources.
    4. href is used for external resources, and src is used for internal resources.

True or False Question

  1. The <img> tag in HTML is used to display an image, and it must have a "src" attribute to specify the image's source.
    True
  2. Adding the "autoplay" attribute to the <audio> tag will always play the audio file as soon as the page loads.
    True
  3. The "alt" attribute of the <img> tag is optional and is only required if the image contains critical information.
    False alt 属性包含一条对图像的文本描述,这不是强制性的
  4. The "controls" attribute on the <video> tag provides users with a built-in player to control playback, such as play, pause, and volume.
    True
  5. Hyperlinks created with the <a> tag can only link to other webpages and cannot be used for in-page navigation.
    False 可以链接到页面内的锚点(如 href="#section1")
  6. The "src" attribute of the <video> tag must point to a video file that is compatible with the user's browser.
    True
  7. To create a hyperlink that opens in a new browser tab, the "target" attribute should be set to "_blank".
    True
  8. The "autoplay" and "muted" attributes can be combined in the <video> tag to automatically play the video silently.
    True
  9. The "alt" attribute of the <img> tag is primarily used for improving accessibility and SEO, rather than displaying alternative content when the image fails to load.
    False
  10. The <source> tag is typically nested inside the <audio> or <video> tag to specify different media files for different browser compatibility.
    True
  11. <img> is a block level element, while <video> is an inline element.
    False img是inline, video是block

Definition of Term

  1. Multimedia
    Any media which can carry information, such as text, image, video, audio and so on.
  2. Hyperlink
    在网页之间或页面内实现跳转的机制。让用户通过点击文本、图像等内容“跳转”到其他资源,比如网页、文档、邮箱地址或页面内的特定位置。