HTML Links and URLs Basics
29 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 attribute is used to merge cells across columns in a table?

  • span
  • width
  • colspan (correct)
  • rowspan
  • The caption element should be placed after the closing tag.

    False

    What is the purpose of using colspan and rowspan attributes in tables?

    To merge columns and rows in a table.

    The __________ element is used to add a title to a table.

    <p>caption</p> Signup and view all the answers

    Match the following table elements to their purposes:

    <table> = Defines the table structure <tr> = Defines a table row <th> = Defines a header cell <td> = Defines a standard cell Signup and view all the answers

    Which attribute allows a video to play continuously?

    <p>loop</p> Signup and view all the answers

    The only supported audio formats as of 2024 are MP3, WAV, and FLAC.

    <p>False</p> Signup and view all the answers

    What does the 'poster' attribute do in video elements?

    <p>It displays an image before the video starts playing.</p> Signup and view all the answers

    The HTML element used for playing audio files is called the ______.

    <p>AUDIO element</p> Signup and view all the answers

    Match the following audio formats with their compatibility status:

    <p>MP3 = Supported WAV = Supported OGG = Supported FLAC = Not Supported</p> Signup and view all the answers

    Which attribute of the audio element controls whether it plays automatically?

    <p>autoplay</p> Signup and view all the answers

    Browsers that support a feature are not important when developing a website.

    <p>False</p> Signup and view all the answers

    What HTML element is used to create tables?

    <p>TABLE element</p> Signup and view all the answers

    Which of the following resources offers free images?

    <p>Pixabay</p> Signup and view all the answers

    The VIDEO ELEMENT does not require a closing tag.

    <p>False</p> Signup and view all the answers

    What attribute would you use in a video element to add playback controls?

    <p>controls</p> Signup and view all the answers

    A MIME TYPE is structured as a type and a ______, separated by a slash.

    <p>subtype</p> Signup and view all the answers

    Match the following HTML elements with their primary purpose:

    <p>IMG = Displays images VIDEO = Embeds videos SOURCE = Specifies media file location AUTOPLAY = Automatically starts playback</p> Signup and view all the answers

    What is the effect of the autoplay attribute in the video element?

    <p>It starts playing the video automatically when the page loads.</p> Signup and view all the answers

    Boolean attributes in HTML require a value to be recognized.

    <p>False</p> Signup and view all the answers

    What should you do if an image fails to load?

    <p>Provide fallback text or an alternate image.</p> Signup and view all the answers

    What does the 'href' attribute in the anchor element specify?

    <p>The web address where users will be redirected</p> Signup and view all the answers

    A relative URL refers to a complete file path on a user's computer.

    <p>False</p> Signup and view all the answers

    What is the purpose of the target attribute in a hyperlink?

    <p>To specify how to open the linked page, such as in a new tab.</p> Signup and view all the answers

    The part of HTML that allows you to create a link is called the ______ element.

    <p>anchor</p> Signup and view all the answers

    Match the following types of URLs with their descriptions:

    <p>Relative URL = Specifies a path based on the current directory Absolute URL = Specifies the complete file path to a location Anchor Element = HTML element used to create links Navigation Menu = Collection of links directing to specific pages</p> Signup and view all the answers

    What does placing a '#' before an ID in a hyperlink do?

    <p>It signifies a specific section within the same page</p> Signup and view all the answers

    Links can only be represented as text in HTML.

    <p>False</p> Signup and view all the answers

    What is an example of a way to create a hyperlink in HTML?

    <p><a href='page2.html'>Go to page 2</a></p> Signup and view all the answers

    Study Notes

    • Hyperlinks, commonly known as links, connect to other web pages.
    • They can be text, images, or any other HTML element.
    • The anchor element (<a>) is used to create links.
    • The href attribute specifies the URL where the user will be redirected.
    • The "Visit Youtube" text is the displayed text of the link.

    Relative URLs

    • ./ before a filename indicates the current directory, meaning the file is in the same folder as the current page.
    • C:\Users\heisenberg\Desktop\page2.html is an absolute URL, which should be avoided for better code reusability.
    • The target attribute with a value of _blank opens the linked URL in a new tab.

    Scrolling to Specific Elements

    • An ID is a unique identifier assigned to an HTML element.
    • A link with the href attribute set to #section1 scrolls to the element with the ID "section1."
    • mailto: followed by an email address opens the user's email client with a new email to the specified address.

    Images

    • The width and height attributes set the size of an image in pixels.

    Videos

    • The video element embeds a video.
    • The source element within the video element specifies the video file location.
    • The type attribute indicates the format of the video file (e.g., "video/mp4").
    • Multiple source tags can be used for different formats to ensure browser compatibility.
    • The controls boolean attribute adds video controls (play/pause, volume).

    Audio

    • The audio element is used to play audio files.
    • The source element specifies the audio file location.
    • Common audio formats include MP3, WAV, and OGG.

    Browser Compatibility

    • caniuse.com provides information on browser support for HTML, CSS, and JavaScript features.
    • The percentage of users who can use a feature without problems is shown.
    • Browser versions with different levels of support are listed (supported, partially supported, not supported).

    Tables

    • The table element creates tables.
    • The tr element creates rows.
    • The td element creates data cells.
    • The th element creates header cells.
    • Tables can be styled with CSS for borders and other visual elements.

    Table Structure

    • The thead element represents the table header.
    • The tbody element represents the table body.
    • The tfoot element represents the table footer.

    Merging Cells

    • The colspan attribute spans cells across multiple columns.
    • The rowspan attribute spans cells across multiple rows.

    Table Caption

    • The caption element adds a title to a table.
    • It should be placed directly after the opening table tag.

    Studying That Suits You

    Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

    Quiz Team

    Related Documents

    Web Development Book PDF

    Description

    This quiz covers the fundamentals of hyperlinks and URLs in HTML. Learn how to create links, use relative and absolute URLs, and manage links that open in new tabs. Master the concepts of scrolling to specific elements and creating email links.

    More Like This

    HTML Flashcards
    10 questions

    HTML Flashcards

    LoyalLanthanum avatar
    LoyalLanthanum
    HTML Basics and URL Structure
    0 questions
    Code HS HTML 2.4-2.7 Flashcards
    5 questions
    HTML Block and Inline Elements Quiz
    11 questions
    Use Quizgecko on...
    Browser
    Browser