HTML Attributes Quiz: href, src, Width & Height, alt, style
12 Questions
0 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What is the purpose of the alt attribute in HTML?

  • To declare the title of a Web page
  • To provide an alternate text for an image (correct)
  • To add styles to an element
  • To specify the language of the Web page
  • What is the purpose of the lang attribute in HTML?

  • To add styles to an element
  • To specify the title of a Web page
  • To declare the language of the Web page (correct)
  • To provide an alternate text for an image
  • What is the recommended convention for writing attribute names in HTML?

  • Mixed case
  • Uppercase
  • Sentence case
  • Lowercase (correct)
  • Why is it important to quote attribute values in HTML?

    <p>To distinguish between attribute names and values</p> Signup and view all the answers

    What can happen if an image cannot be displayed in a Web page?

    <p>An alternate text will be displayed</p> Signup and view all the answers

    What is the purpose of the style attribute in HTML?

    <p>To add styles to an element</p> Signup and view all the answers

    What is the purpose of HTML attributes?

    <p>To provide additional information about HTML elements</p> Signup and view all the answers

    What does the href attribute specify?

    <p>The URL of the page the link goes to</p> Signup and view all the answers

    What are the two ways to specify a URL in the src attribute?

    <p>Absolute URL and relative URL</p> Signup and view all the answers

    What is the purpose of the width and height attributes in the tag?

    <p>To specify the size of the image</p> Signup and view all the answers

    What happens if the URL in the src attribute begins without a slash?

    <p>It will be relative to the current page</p> Signup and view all the answers

    What is the purpose of the tag?

    <p>To define a hyperlink</p> Signup and view all the answers

    More Like This

    HTML Links and Hyperlinks Quiz
    5 questions
    HTML href Attribute Usage Quiz
    2 questions
    Use Quizgecko on...
    Browser
    Browser