“To specify whether to display playback controls such as pause and play buttons for the video, their autoplay attribute of the video element is used.”
❌ False ✅
Correct: The
controlsattribute is used to display playback buttons, notautoplay.
“The
srcattribute is used to specify the URL or the path of the image to be displayed.”
✔ True ✅
Correct.
<img src="image.jpg">shows the image.
“Ordered and unordered lists can be meshed within each other to form nested lists.”
✔ True ✅
Correct. You can have
<ul>inside<ol>or vice versa.
“We cannot specify an image as the list item’s marker when creating lists.”
❌ False ✅
Correct: You can use an image as a marker with the CSS property
list-style-image.<ul style="list-style-image: url('star.png');"> <li>Apple</li> </ul>
“The ordered lists can only be started from letter A or Roman number I.”
❌ False ✅
Correct: Ordered lists can start from any number using the
startattribute.<ol start="5"> <li>Item 5</li> </ol>
D. Answer these questions
1. Discuss the use of src and alt attributes of <img> element.
The <img> element is used to display images in a webpage. Two important attributes of <img> are:
src(source)This attribute specifies the path or URL of the image to be displayed.
Example:
<img src="flower.jpg" alt="A red rose">
alt(alternative text)This attribute provides descriptive text for the image.
Example:
<img src="flower.jpg" alt="A red rose in full bloom">
Usefulness:
srcensures the image appears correctly.altimproves accessibility and SEO and provides information when images fail to load.
2. Discuss the use of any three attributes of <video> / <audio> elements.
The <video> and <audio> elements are used to embed media in webpages. Important attributes are:
controlsDisplays play, pause, volume, and other controls for users.
Example:
<video src="movie.mp4" controls></video>
autoplayStarts playing the media automatically when the page loads.
Example:
<audio src="song.mp3" autoplay></audio>
loopPlays the media repeatedly in a loop.
Example:
<video src="clip.mp4" loop controls></video>
Other attributes: muted (start muted), preload (load media in advance).
3. Differentiate between <col> and <ul> elements.
| Feature | <ol> | <ul> |
|---|---|---|
| Purpose | Defines a column in a table (<table>) | Defines an unordered list (bulleted list) |
| Usage | Must be inside <colgroup> in a table | Can be used anywhere in HTML body |
| Content | Does not contain content; only styling | Contains list items <li> |
| Example | <col span="2" style="background-color: yellow"> | <ul><li>Apple</li><li>Banana</li></ul> |
4. Discuss the use of the following properties in context with lists
a)
list-style-typeDefines the type of marker (bullet or number) for list items.
Examples:
disc(default solid bullet)circle(hollow circle)square(square bullet)decimal(numbers for ordered lists)
Example:
<ul style="list-style-type: circle;"> <li>Apple</li> <li>Banana</li> </ul>
b)
list-style-imageUses an image instead of a regular bullet for list items.
Example:
<ul style="list-style-image: url('star.png');"> <li>Apple</li> <li>Banana</li> </ul>
Differentiate between Border-spacing and Padding
| Border-spacing | Padding |
|---|---|
| Space between adjacent table cells | Space between cell border and its content |
Applied to <table> | Applied to <td> / <th> |
| Affects distance between cells | Affects inner spacing of a cell |
https://www.bing.com/search?q=html+video+controls&FORM=QSRE3
ReplyDelete