HTML Basics Quiz
37 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

Which tag is used to define an unordered list in HTML?

  • <li>
  • <ul> (correct)
  • <ol>
  • <dl>
  • What does the 'src' attribute in the <img> tag represent?

  • Source code location
  • Screen resolution
  • Structured reference
  • Source of the image (correct)
  • Which of the following attributes is NOT used for sizing images?

  • height
  • width
  • alt
  • size (correct)
  • How can you add vertical and horizontal space around an image in HTML?

    <p>Using the vspace and hspace attributes</p> Signup and view all the answers

    In a definition list, what tag is used to define the term?

    <dt> Signup and view all the answers

    What is the purpose of the 'alt' attribute in the <img> tag?

    <p>To describe the image if it cannot be displayed</p> Signup and view all the answers

    What type of list allows for numbered items in HTML?

    <ol> Signup and view all the answers

    Which of the following illustrates the correct format for an image tag with title and alt attributes?

    <img src='image.jpg' alt='Description' title='Title'> Signup and view all the answers

    What does the BEHAVIOR attribute set to SLIDE do in a marquee?

    <p>The content stops when it reaches the edge</p> Signup and view all the answers

    Which value corresponds to a marquee that continuously loops?

    <p>LOOP=INFINITE</p> Signup and view all the answers

    What does the scrollamount attribute control in a marquee?

    <p>The amount of pixel movement per scroll</p> Signup and view all the answers

    What is the default behavior of a marquee set with the BEHAVIOR attribute?

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

    Which HTML tag is used to start an HTML table?

    <TABLE> Signup and view all the answers

    What attribute allows setting the delay time between moves in a marquee?

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

    What happens to the content when a marquee is set with BEHAVIOR=ALTERNATE?

    <p>The content bounces back and stays visible</p> Signup and view all the answers

    Which attribute would you use to set the background color of a marquee?

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

    What attribute is used to change the background color of a table or cell?

    <p>BGCOLOR=color&gt;</p> Signup and view all the answers

    Which attribute would you use to have a cell span across two rows?

    <p>ROWSPAN=#&gt;</p> Signup and view all the answers

    If you want to align text centrally within a table cell, which attribute should be used?

    <p>CENTER&gt;</p> Signup and view all the answers

    What does the colspan attribute specifically define in a table?

    <p>The number of columns a cell will span across.</p> Signup and view all the answers

    What is the primary purpose of frames in a web layout?

    <p>To allow multiple web pages to be displayed in the same browser window.</p> Signup and view all the answers

    When setting up a page layout using tables, what is a beneficial practice?

    <p>Adding background colors to visually separate columns.</p> Signup and view all the answers

    How can you ensure that text within a cell is aligned to the left?

    <p>ALIGN=LEFT&gt;</p> Signup and view all the answers

    What should the value of the rowspan attribute be if you want a cell to cover three rows?

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

    What is the purpose of the CHECKED attribute in a radio button?

    <p>It indicates that the radio button is the default choice.</p> Signup and view all the answers

    Which statement about hidden fields is true?

    <p>Users cannot see the content of hidden fields.</p> Signup and view all the answers

    What does the SIZE attribute in a selection list determine?

    <p>The number of items visible to the user in the list box.</p> Signup and view all the answers

    Which purpose does the RESET type serve in form buttons?

    <p>It clears all fields in the form back to their default values.</p> Signup and view all the answers

    How can users select multiple options from a selection list?

    <p>Using the CTRL or SHIFT key while making selections.</p> Signup and view all the answers

    What is a common disadvantage of using frames in web design?

    <p>Search engines have difficulty indexing framed content.</p> Signup and view all the answers

    Which of the following is a typical application of frames in web design?

    <p>Creating static control bars visible at all times.</p> Signup and view all the answers

    Which attribute in a <FRAMESET> tag specifies the width of the columns?

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

    What is one of the benefits of using frames when browsing a website?

    <p>They allow continuous visibility of key elements.</p> Signup and view all the answers

    How does the <FRAME> tag operate in the context of frames?

    <p>It specifies the URL of the page to load in a frame.</p> Signup and view all the answers

    What happens to the content of frames when a user navigates within a framed site?

    <p>Only the content of the active frame changes.</p> Signup and view all the answers

    Which scenario is least likely to be a reason for not using frames in web design?

    <p>Increased ease of page printing.</p> Signup and view all the answers

    Why might frames have decreased in popularity among large websites?

    <p>Users prefer simpler navigation methods.</p> Signup and view all the answers

    Study Notes

    HTML Headings

    • Six heading tags in HTML: <h1>, <h2>, <h3>, <h4>, <h5>, <h6>
    • Headings are displayed in descending order of size, from largest (<h1>) to smallest (<h6>).
    • Blank lines are added before and after headings for better readability and formatting.

    HTML Lists

    • Three types of lists: unordered, ordered, and definition lists.
    • Unordered lists use <ul> and <li> tags to create list items with bullet points.
    • Ordered lists use <ol> and <li> tags to create numbered list items.
    • Definition lists use <dl>, <dt>, and <dd> tags to display terms and their definitions.

    The <img> Tag

    • The <img> tag is used to display images in HTML.
    • It's an empty tag, meaning it only contains attributes and doesn't have a closing tag.
    • The src attribute specifies the URL of the image to be displayed.

    Image Attributes

    • The alt attribute provides alternative text for the image, which is displayed if the image cannot be loaded.
    • The width and height attributes define the size of the image in pixels.
    • The title attribute adds a tooltip to the image that appears when the mouse hovers over it.
    • The vspace and hspace attributes control the vertical and horizontal spacing between the image and surrounding content.

    The Marquee Tag

    • The <marquee> tag creates a scrolling text effect with a fixed background color set by the bgcolor attribute.
    • The direction attribute determines the scrolling direction, with options: left, right, up, down (default is left).
    • The behavior attribute controls the scrolling behavior:
      • scroll (default): continuous scrolling.
      • slide: content slides to the edge and stops.
      • alternate: content bounces back and forth.
    • The loop attribute sets the number of times the marquee scrolls, with infinite being the default.
    • The scrollamount attribute controls the distance of each scroll movement in pixels.
    • The scrolldelay attribute defines the delay between each scroll movement in milliseconds.

    HTML Tables

    • Tables organize data into rows and columns, with cells (represented by <TD>) holding the data.
    • Table structure is defined by the <TABLE>, <TR>, and <TD> tags.

    Table Attributes

    • The WIDTH attribute sets the width of the table or a cell in pixels or as a percentage of the container.
    • The HEIGHT attribute sets the height of the table or a cell in pixels or as a percentage.
    • The BGCOLOR attribute defines the background color for the table or cell.
    • The BACKGROUND attribute sets a tiled background image for the table or cell.

    Cell Attributes

    • COLSPAN: makes a cell span across multiple columns.
    • ROWSPAN: makes a cell span across multiple rows.
    • ALIGN: aligns the text within the cell: LEFT, RIGHT, or CENTER.
    • VALIGN: aligns the text vertically within the cell: TOP, BOTTOM, or MIDDLE.

    HTML Table - Colspan and Rowspan

    • COLSPAN stretches a cell horizontally to cover a specified number of columns.
    • ROWSPAN stretches a cell vertically to cover a specified number of rows.

    Using Tables for Page Layout

    • Tables were traditionally used for page layout, creating newspaper-like column designs or sectioning content.
    • Techniques included nesting tables, setting background colors, adding cell padding, and using row-spanning cells.

    HTML Frames

    • Frames divide the browser window into separate regions, each displaying content from a different page.
    • Frame structure is defined by the <FRAMESET> and <FRAME> tags.

    <FRAMESET> Attributes

    • COLS: defines the column arrangement of the frames, using pixel values or percentages.
    • ROWS: defines the row arrangement of the frames, using pixel values.

    The <FRAME> Tag

    • The <FRAME> tag specifies the page to be displayed in a particular frame using the SRC attribute.

    Hidden Fields

    • Hidden fields are not displayed in the form but still send information to the server.
    • They are defined using <INPUT TYPE=HIDDEN NAME=text VALUE=value>.

    Radio Buttons

    • Radio buttons allow users to select one option from a group.
    • They are defined using <INPUT TYPE=RADIO NAME=field VALUE=value CHECKED>.
    • The NAME attribute identifies the field that the button belongs to, and VALUE specifies the value sent to the server upon selection.
    • CHECKED makes the radio button the default choice.

    Check Boxes

    • Check boxes let users select one or more options from a list.
    • They are defined using <INPUT TYPE=CHECKBOX NAME=field VALUE=value CHECKED>.
    • The NAME attribute identifies the field, VALUE sets the value sent to the server, and CHECKED makes the box checked by default.

    Text Areas

    • Text areas provide a multi-line input field for user comments or text.
    • They are defined using <TEXTAREA NAME=field COLS=value ROWS=value WRAP=option>.
    • The NAME attribute identifies the field.
    • The COLS attribute sets the width of the text area in characters.
    • The ROWS attribute specifies the number of rows in the text area.
    • The WRAP attribute controls text wrapping: OFF disables it, SOFT enables it.

    Selection Lists

    • Selection lists (or dropdown menus) allow users to choose an option from a list.
    • They are defined using <SELECT NAME=field SIZE=value MULTIPLE>.
    • The NAME attribute identifies the field.
    • The SIZE attribute determines the number of visible options in the list.
    • The MULTIPLE attribute allows users to select multiple options using Ctrl or Shift keys.
    • Individual options within selection lists are specified using <OPTION> tags.

    Form Buttons

    • Form buttons trigger actions when clicked by the user.
    • They are defined using <INPUT TYPE=text VALUE="text">.
    • The VALUE attribute defines the button's label.
    • The TYPE attribute determines the action:
      • SUBMIT: submits the form data to the server.
      • RESET: clears all form fields.
      • BUTTON: executes a specific action usually implemented by JavaScript.

    Studying That Suits You

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

    Quiz Team

    Related Documents

    HTML Notes From Teacher.pdf

    Description

    Test your knowledge of HTML headings, lists, and image tags with this quiz. Learn about the different types of headings, list formats, and how to properly use the <img> tag and attributes. Perfect for beginners looking to solidify their understanding of HTML.

    More Like This

    HTML Tags and Headings
    0 questions

    HTML Tags and Headings

    NourishingCthulhu6742 avatar
    NourishingCthulhu6742
    HTML Headings and Paragraphs Quiz
    10 questions
    Use Quizgecko on...
    Browser
    Browser