Skip to content

Latest commit

 

History

History
45 lines (24 loc) · 2.71 KB

class-11.md

File metadata and controls

45 lines (24 loc) · 2.71 KB

Video and Audio Content

Explain how the ability to use video and audio on the web has evolved since the early 2000s.

Since the early 2000s, the evolution of web standards like HTML5 has allowed for native support of video and audio elements, eliminating the need for plugins like Flash.

Describe the use of the src and controls attributes in the video element.

The src attribute in the video element specifies the URL of the video file to be displayed. It allows the browser to locate and load the video content.

The controls attribute in the video element adds playback controls (such as play, pause, volume, etc.) to the video player, enabling users to interact with the video easily.

Why is it important to have fallback content inside the video element?

Fallback content inside the video element is important to provide an alternative viewing experience for users in case the video cannot be played, ensuring better accessibility and user experience.

Write a very short story where audio and video are characters.

In the digital city of Cyberia, Audio and Video roamed, bringing melodies and visuals to life, enchanting all who encountered them.

A Complete Guide to Grid

How does Grid layout differ from Flex?

Grid layout is two-dimensional, allowing precise control over rows and columns, while Flexbox is one-dimensional, best for aligning items within a single axis.

Grid container, grid item, and grid line are a few important terms to understand when using Grid. Please describe these terms in a few sentences.

  • Grid container: Element containing child elements laid out in a grid format.
    • Grid item: Child element of a grid container that participates in the grid layout. Grid lines: Lines separating rows and columns in the grid layout.

Responsive Images

Besides making a site visually appealing across different screen sizes, why should developers make images responsive?

Developers should make images responsive to enhance user experience, improve site performance, and ensure accessibility across different devices and screen sizes.

Define the following img attributes srcset and sizes. Write an example of how they are used.

The srcset attribute specifies multiple image sources with different resolutions or sizes, allowing browsers to choose the most appropriate one. The sizes attribute defines the display size of the image relative to the viewport width.

How is srcset more helpful for responsive images than CSS or JavaScript?

srcset is more helpful for responsive images than CSS or JavaScript because it allows browsers to automatically choose the most appropriate image source based on factors like device pixel density and viewport size, without requiring additional code.