Single Choice Question

  1. The newest version of HTML is
    1. HTML 5
    2. HTML 4
    3. HTML 3
    4. HTML 2
  2. What is the complete name of HTML?
    1. Hyper Text Transfer Language HTTP全称
    2. Hyper Text Modeling Language
    3. Hyper Text Markup language
    4. Hyper Text Modeling Link
  3. < !DOCTYPE html > specifies the version of HTML is ?
    1. HTML 5
    2. HTML 4
    3. HTML 3
    4. HTML 6
  4. Which tag is not the self-closed tag?
    1. img
    2. br
    3. p
    4. a
  5. Which tag is the self-closed tag?
    1. div
    2. p
    3. span
    4. br
  6. In the HTML code: <p align="left">This is left aligned</p>, the "align" is
    1. attribute
    2. value
    3. tag
    4. none of above
  7. In the HTML code: <p align="left">This is left aligned</p>, the "align" has a line running through because
    1. It is important
    2. It is optional
    3. It is obsolete
    4. It is a new feature
  8. Which of the following is not a valid HTML tag?
    1. i
    2. b
    3. br
    4. s
  9. Which of the following is the core HTML attribute which all tags have?
    1. href
    2. src
    3. alt
    4. style
  10. Which of the following is not the core HTML attribute which all tags have?
    1. title
    2. src
    3. id
    4. style
  11. About the comment, which following statement is correct?
    1. The comment is not displayed on the web page
    2. The comment is displayed on the web page
    3. The comment is displayed on the web page but not displayed on the source code
    4. The comment is displayed on the web page but not displayed on the source code and the browser
  12. For the comment in the HTML page, which following code is correct?
    1. <--This is a comment-->
    2. /*This is a comment*/
    3. <!--This is a comment-->
    4. //This is a comment
  13. The tag which is used to defines the title of the document is
    1. title
    2. h1
    3. h2
    4. head
  14. The tag used to provide information of the webpage is
    1. meta 用来提供网页的元信息(metadata)
    2. head
    3. title
    4. body
  15. About the tags rules, which statement is correct?
    1. All tags can not be nested 可以嵌套
    2. Each element has a pair of start tag and end tag 自包含标签不用
    3. End tag should be closed with "\" 斜杠方向反了
    4. Tag name is case-insensitive
  16. About the tags rules, which statement is not correct?
    1. Avoid using deprecated tags
    2. Indentation is important
    3. Always start HTML document with a doctype declaration
    4. < br> is better than < br/> 都是有效写法
  17. About the attribute rules, which statement is not correct?
    1. Avoid use duplicate attributes
    2. Use single quotation marks 比较奇怪,可能是改成单双引号都可以
    3. Don't use special characters
    4. Attribute name is case-insensitive
  18. About the HTML file naming rules, which statement is not correct?
    1. Use lowercase letters
    2. Avoid Spaces and Special Characters
    3. Keep it short and descriptive
    4. .htm extension is better than .html
  19. All tag should be enclosed in
    1. <>
    2. {}
    3. ""
    4. ''
  20. To avoid our webpage has garbled text problem, which following code is correct?
    1. <meta charset="UTF-8">
    2. <meta charset="ISO-8859-1">
    3. <meta charset="Unicode">
    4. <meta charset="GB2312">
  21. The tag cannot be put in the head tag is
    1. title
    2. meta
    3. body
    4. script

True or False Question

  1. Head tag is the tag in which write the metadata of the HTML document.
    True
  2. Body tag is the tag in which write the content of the webpage.
    True
  3. If we want to add a line break in the webpage, we should use the tag "br".
    True
  4. Comment is not displayed on the web page.
    True
  5. Attribute name is case-insensitive.
    True
  6. Newest version of HTML is HTML 5.
    True
  7. Attribute value should be enclosed with quotation marks.
    True
  8. Empty tag is not allowed in HTML.
    False
  9. In an HTML file, <html></html> respectively indicate the beginning and the end of an HTML file.
    True
  10. The extension of an HTML document is html or htm. The document name can only be composed of English letters, numbers, or underscores.
    True
  11. All tags in an HTML page start with "<" and end with ">".
    True
  12. All tags in HTML are paired tags .
    False
  13. All tags in HTML can be nested and used interchangeably.
    False 可以嵌套但并不是可以任意互换
  14. HTML code is not case-sensitive.
    True

Definition of Term

  1. HTML
    hyperText markup language, a standard markup language to edit content of webpages. HTML uses tags to structure text and other content
  2. Comment
    注释用于在代码中添加备注,供开发者查看,不会在页面中显示,被浏览器忽略。
  3. HTML Tag
    HTML 标签是网页元素的基本组成单元,位于尖括号 <> 中。Each element should have at least one pair of tag, some elements only need one tag(self-closing element自包含标签)
  4. Tag Attribute
    属性是用在开始标签内,提供额外信息或控制方式的键-值对
  5. Self-closed Tag
    这是不成对、仅在开始标签形式出现的标签。没有内容部分,也不需要结束标签。

Short Answer

  1. What are the key advantages of learning HTML?
    Create Web Site, Become a web designer, Understand web, Learn other languages
  2. What are the characteristics of HTML?
    Easy to be understood, Flexibility, Linkable, Limitless features, Support
  3. Write the rules of using HTML tags(at least 5 points).
    标签用尖括号 < 和 > 包裹, HTML 标签名不区分大小写, 遵循规范嵌套(如 < p> 内不能直接嵌套 < div>), 声明 < !DOCTYPE html>, self-closed tag不需要结束标签
  4. Write the rules of using tag attribute(at least 5 points).
    属性值必须使用引号,属性名不区分大小写,避免重复属性,转义特殊字符(Escape special characters), 使用全局属性时要规范(如 id 唯一)
  5. Write the rules of naming HTML file(at least 5 points).
    No special character, Consist of character, number and _, Case sensitive in some OS, html is better than htm, Home page should be named index.html or default.html