Single Choice Question

  1. Which HTML tag is used to create an unordered list?
    1. <ul>
    2. <ol>
    3. <dl>
    4. <li>
  2. What is the correct way to define a list item in an unordered list?
    1. <ul><item>Item 1</item></ul>
    2. <ul><li>Item 1</li></ul>
    3. <ul>Item 1</ul>
    4. <ol><li>Item 1</li></ol>
  3. Which attribute can be used to define the type of numbering for an ordered list?
    1. type
    2. number
    3. style
    4. list-style-type
  4. How do you create a table row in HTML?
    1. <tr>
    2. <td>
    3. <th>
    4. <table>
  5. What tag is used to define a table header cell in HTML?
    1. <td>
    2. <th> 定义表头单元格
    3. <tr>
    4. <thead> 用于定义表格的头部区域,可以包含多个 < tr>
  6. Which attribute can be used to group rows in a table header or footer?
    1. group
    2. header
    3. footer
    4. thead and tfoot
  7. What is the purpose of the <iframe> tag in HTML?
    1. To embed an image
    2. To embed another webpage within a webpage
    3. To define a table cell
    4. To create a form
  8. How do you specify the source of the content to be embedded in an <iframe>?
    1. src attribute
    2. href attribute
    3. content attribute
    4. embed attribute
  9. Which semantic tag is used to represent a section of a document that is independently distributable or reusable, such as a chapter, the header, footer, or any other section of the document? 有疑问
    1. <article> 文档中独立的、可重复使用的内容块
    2. <section>
    3. <aside> 与主内容间接相关的辅助内容
    4. <header> 表示页面或某个区块的头部信息
  10. What semantic tag is used to represent a navigation link section within a webpage?
    1. <nav>
    2. <menu>
    3. <links>
    4. <footer>
  11. How do you define a footer for a webpage using semantic HTML?
    1. <footer>
    2. <end>
    3. <bottom>
    4. <page-footer>
  12. Which semantic tag is used to represent a sidebar or additional information that is tangentially related to the main content?
    1. <aside>
    2. <section>
    3. <article>
    4. <supplement>
  13. What is the purpose of the <main> tag in HTML5?
    1. To define the main content of a webpage
    2. To define a table header
    3. To embed an image
    4. To create a form
  14. How do you define a table caption in HTML?
    1. <caption> 用于定义一个表格的标题或说明文字
    2. <title>
    3. <header>
    4. <label>
  15. Which attribute can be used to define the border of a table in HTML?
    1. border syllabus有,但是已经过时
    2. frame
    3. rules
    4. style="border: 1px solid black;"
  16. What is the difference between <th> and <td> in HTML tables?
    1. <th> is for table headers, and <td> is for table data
    2. <th> is for table data, and <td> is for table headers
    3. Both are used for table data, but <th> is styled differently
    4. <th> is for table rows, and <td> is for table columns
  17. Usually, one menu on a webpage is expressed by
    1. <ul>
    2. <ol>
    3. <dl>
    4. <menu>
  18. What is the purpose of the colspan attribute in HTML tables?
    1. To merge multiple rows into one
    2. To merge multiple columns into one
    3. To define the width of a column
    4. To define the height of a row
  19. How do you define a table header group in HTML?
    1. <thead>
    2. <header>
    3. <thgroup>
    4. <hgroup>
  20. Which semantic tag is used to represent a short quotation or a phrase from another source?
    1. <q> 适合short inline quotation
    2. <blockquote> 用于块级引用,即引用较长的段落,常用于文章引用
    3. <cite>
    4. <abbr>
  21. Which tag is belong to the block level?
    1. <div>
    2. <span>
    3. <strong>
    4. <a>
  22. Which tag is belong to the inline level?
    1. <div>
    2. <section>
    3. <p>
    4. <a>
  23. If one tag occupy the whole line, what is the category of that tag?
    1. Inline Element
    2. Block Element
    3. Group Element
    4. Complete Element

True or False Question

  1. The <ol> tag is used to create an unordered list.
    False
  2. The <ul> tag is used to create an ordered list.
    False
  3. The <table> tag is used to create a list in an HTML document.
    False
  4. The <td> tag defines a table row in an HTML table.
    False
  5. The <iframe> tag is used to embed another webpage within a webpage.
    True
  6. Semantic HTML tags like <header>, <footer>, and <article> help improve the accessibility and structure of a webpage.
    True
  7. The <span> tag is a block-level container used for styling and layout purposes.
    False
  8. The <div> tag is an inline container used for styling and layout purposes.
    False
  9. The <section> tag defines a section in a document, such as chapters, headers, footers, or other sections of a page.
    True
  10. The <nav> tag defines a section of a page that contains navigation links.
    True
  11. Block level elements are those that start on a new line and take up the full width available.
    True
  12. Inline element can be placed within a block level element.
    True
  13. Specify size of an inline element does not work.
    True
  14. List cannot be nested within another list.
    False

Definition of Term

  1. Block Element
    HTML 中的块级元素是独占一行的元素,其宽度默认占满父容器,可以包含其他块级或行内元素。
  2. Inline Element
    行内元素只占据自身内容的宽度,不会换行,常用于包裹短文本或嵌入其他元素
  3. Embedded Webpage
    嵌入网页是指在当前网页中嵌入另一个网页的内容,通常通过 < iframe> 标签 实现。

Short Answer

  1. Try to compare the difference between the block element and the inline element.
    block element: Starts on a new line, occupies full width; used for Structural layout (paragraphs, sections); Can contain both block and inline elements; Width and height can be set freely
    inline element: Flows within a line, only takes needed space; used for Styling or linking small content; Can only contain inline elements; Width and height cannot be set
  2. Try to compare <div> tag and <span> tag.
    div is a block element defines a block container for layout, used for grouping sections;
    span is an inline element defines a small inline container, used for styling inline text
  3. How many list types in HTML5? What are they?
    3 types: ordered list, unordered list, description list
  4. Specify the basic tags in a table in HTML5.(at least 3)
    table, tr, th, td, caption, thead, tbody, tfoot
  5. Specify the major semantic tags to create basic structure of document in HTML5.(at least 5)
    header, nav, main, article, section, footer, aside