1. “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 controls attribute is used to display playback buttons, not autoplay.


  1. “The src attribute is used to specify the URL or the path of the image to be displayed.”
    True

  • Correct. <img src="image.jpg"> shows the image.


  1. “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.


  1. “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>
    

  1. “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 start attribute.

    <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:

  • src ensures the image appears correctly.

  • alt improves 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:

  1. controls

    • Displays play, pause, volume, and other controls for users.

    • Example:

      <video src="movie.mp4" controls></video>
      
  2. autoplay

    • Starts playing the media automatically when the page loads.

    • Example:

      <audio src="song.mp3" autoplay></audio>
      
  3. loop

    • Plays 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>
PurposeDefines a column in a table (<table>)Defines an unordered list (bulleted list)
UsageMust be inside <colgroup> in a tableCan be used anywhere in HTML body
ContentDoes not contain content; only stylingContains 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-type

    • Defines 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-image

    • Uses 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-spacingPadding
Space between adjacent table cellsSpace between cell border and its content
Applied to <table>Applied to <td> / <th>
Affects distance between cellsAffects inner spacing of a cell

Comments

  1. https://www.bing.com/search?q=html+video+controls&FORM=QSRE3

    ReplyDelete

Post a Comment

Popular posts from this blog

class 8 computer chapter 5

class 7 last chapter

CLASS 8 COMPUTER