Chuyển đến nội dung
Đề Trắc Nghiệm
  • Luyện thi TOPIK
  • Luyện thi IELTS
  • Luyện thi APTIS
  • Luyện thi thử HSK
  • Luyện thi thử TOEIC
  • Luyện thi thử JLPT
  • Luyện thi VSTEP
  • Luyện thi HSA
  • Luyện thi IOE
  • Thi thử THPTQG
  • Bói tình yêu theo tên và tuổi
  • Tra cứu thần số học
  • Luyện thi chứng chỉ xây dựng
  • Luyện thi vào lớp 10
  • Trắc nghiệm THCS

Trắc nghiệm HTML online

1 Tháng 7, 2025 Bởi Admin

Danh sách các bộ trắc nghiệm theo từng chương
  • Chương 1
  • Chương 2

Demo Domain

Trắc nghiệm HTML online

Ngày cập nhật: 3 Tháng 2, 2026

Miễn trừ trách nhiệm:Các bộ câu hỏi trắc nghiệm này được tạo ra nhằm mục đích tham khảo và ôn tập. Mặc dù chúng tôi đã nỗ lực đảm bảo tính chính xác, không có gì đảm bảo rằng mọi thông tin đều hoàn toàn đúng. Người dùng nên sử dụng kết hợp với các nguồn tài liệu chính thống khác và tự chịu trách nhiệm về kết quả học tập của mình.

Chào mừng bạn đọc đã đến với bộ Trắc nghiệm HTML online. Hãy chọn một bộ câu hỏi trắc nghiệm bên dưới để bắt đầu. Chúc bạn làm bài tốt!

★★★★★
★★★★★
4.8/5 (100 đánh giá)

1. Choose the correct HTML tag to make a text italic

A. i
B. italic
C. em
D. it

2. What is the correct way to reference an external style sheet?

A. link rel=’stylesheet’ type=’text/css’ href=’style.css’
B. stylesheet src=’style.css’
C. style src=’style.css’
D. link url=’style.css’

3. In HTML, which attribute is used to provide alternative information for an image if a user cannot view it?

A. alt
B. src
C. title
D. href

4. Which HTML tag is used to define a header cell in a table?

A. th
B. td
C. tr
D. thead

5. Which of the following is the correct HTML tag to insert a background image?

A. background img=’image.gif’
B. body bgimage=’image.gif’
C. img src=’image.gif’ background
D. body style=’background-image:url(image.gif)’

6. Which HTML tag is used to define an internal style sheet?

A. style
B. css
C. script
D. link

7. Which tag is used to embed CSS in an HTML document?

A. style
B. css
C. script
D. link

8. What is the correct HTML for creating a hyperlink?

A. a url=’http://www.example.com’Examplea
B. a href=’http://www.example.com’Example/a
C. a name=’http://www.example.com’Example/a
D. a href=’http://www.example.com’Examplea

9. Which HTML tag is used to create a hyperlink?

A. a
B. link
C. url
D. href

10. How can you open a link in a new tab/browser window?

A. a href=’url’ target=’_blank’
B. a href=’url’ new
C. a href=’url’ target=’new’
D. a href=’url’ onclick=’window.open()’

11. What is the purpose of the ‘fieldset’ element in HTML?

A. To group related elements in a form
B. To define a new font set
C. To create a set of frames
D. To define a new character set

12. Which HTML element is used to display a picture?

A. img
B. picture
C. image
D. src

13. Which HTML tag is used to define a cell (data) in a table?

A. td
B. tr
C. th
D. cell

14. Which HTML tag is used to define a list item?

A. li
B. ol
C. ul
D. list

15. Which HTML tag is used to define an ordered list?

A. ol
B. ul
C. li
D. list

16. Which HTML tag is used to define a table?

A. table
B. tbl
C. tab
D. grid

17. What does HTML stand for?

A. Hyper Text Markup Language
B. Hyperlinks and Text Markup Language
C. Home Tool Markup Language
D. Highly Texted Machine Language

18. Which HTML element is used to define the character set for a document?

A. meta
B. script
C. style
D. link

19. Which HTML tag is used to define a row in a table?

A. tr
B. td
C. th
D. row

20. Which input type defines a slider control?

A. range
B. slider
C. control
D. level

21. In HTML, which attribute is used to specify an image source?

A. src
B. href
C. alt
D. link

22. Which HTML tag is used to define an unordered list?

A. li
B. ol
C. ul
D. list

23. How do you add a comment in HTML?

A. !– This is a comment —
B. // This is a comment
C. ‘ This is a comment
D. # This is a comment

24. Which HTML element is used to define the title of a document?

A. title
B. head
C. header
D. meta

25. Choose the correct HTML tag to make a text bold

A. strong
B. bold
C. bld
D. b

26. Which attribute is used to define inline styles in HTML?

A. style
B. class
C. css
D. font

27. What is the correct HTML for inserting a line break?

A. lb
B. break
C. br/
D. nl

28. Which of the following is NOT a valid HTML5 semantic element?

A. article
B. nav
C. header
D. div

29. What is the purpose of the ‘meta’ tag in HTML?

A. To define a new paragraph.
B. To provide metadata about the HTML document, such as character set, description, keywords, author, and viewport settings.
C. To create a hyperlink.
D. To define a table.

30. Which HTML tag is used to define a table header?

A. th
B. td
C. tr
D. thead

31. What is the purpose of the ‘fieldset’ element in HTML?

A. To create a new font style.
B. To group related elements in a form.
C. To define a section in a document.
D. To add a border around an image.

32. What is the purpose of the ‘datalist’ element in HTML5?

A. To create a data table.
B. To provide a pre-defined list of options for an input element.
C. To define a new data type.
D. To store data locally.

33. Which tag is used to define the structure of an HTML document?

A. body
B. html
C. head
D. doctype

34. What does the ‘colspan’ attribute specify in a ‘table’ element?

A. The number of rows a cell should span.
B. The spacing between cells.
C. The number of columns a cell should span.
D. The color of the cell.

35. What is the purpose of the ‘label’ element in HTML forms?

A. To define the structure of the form.
B. To provide a heading for the form.
C. To provide a caption for form elements, improving accessibility.
D. To create a button.

36. Which HTML element is responsible for displaying the largest heading?

A. h6
B. heading
C. h1
D. h3

37. Which HTML tag is used to define an internal style sheet?

A. style
B. script
C. css
D. link

38. What is the correct HTML to insert an image?

A. img src=’image.gif’ alt=’MyImage’
B. image src=’image.gif’ alt=’MyImage’
C. img url=’image.gif’ alt=’MyImage’
D. picture src=’image.gif’ alt=’MyImage’

39. Which HTML tag is used to embed a video file?

A. media
B. movie
C. video
D. mp4

40. Which tag is used to create an unordered list in HTML?

A. ol
B. list
C. ul
D. dl

41. What is the correct HTML for creating a hyperlink?

A. a url=’http://www.example.com’Example/a
B. a href=’http://www.example.com’Example/a
C. a name=’http://www.example.com’Example/a
D. a http://www.example.com

42. In HTML, what does the ‘alt’ attribute do in the ‘img’ tag?

A. Specifies an alternate color for the image.
B. Provides alternative text for the image if it cannot be displayed.
C. Specifies the alignment of the image.
D. Sets the image as a background.

43. Which input type defines a slider control?

A. range
B. slider
C. level
D. volume

44. Which attribute is used to define the character encoding for an HTML document?

A. charset
B. encoding
C. character
D. code

45. Which attribute is used to specify the URL of a linked resource?

A. link
B. href
C. src
D. url

46. What is the purpose of the ‘details’ and ‘summary’ elements in HTML5?

A. To create a detailed summary of a document.
B. To create a collapsible section of content, where ‘summary’ provides a visible heading and ‘details’ contains the hidden content.
C. To define a new type of list.
D. To create a navigation menu.

47. Which of the following is the correct way to comment out code in HTML?

A. // This is a comment //
B. !– This is a comment —
C. ‘ This is a comment ‘
D. # This is a comment #

48. Which HTML tag is used to define a table row?

A. td
B. th
C. tr
D. table

49. What is the purpose of the ‘figure’ and ‘figcaption’ elements in HTML5?

A. To define a form.
B. To group and provide a caption for self-contained content like images or illustrations.
C. To create a navigation menu.
D. To define a footer for a document.

50. What is the purpose of the ‘canvas’ element in HTML5?

A. To display video content.
B. To create interactive maps.
C. To draw graphics on the fly, via scripting (usually JavaScript).
D. To embed audio files.

51. Which HTML tag is used to define an inline frame?

A. ‘frame’
B. ‘iframe’
C. ‘inlineframe’
D. ‘frameinline’

52. Which attribute is used to define inline styles?

A. ‘font’
B. ‘class’
C. ‘styles’
D. ‘style’

53. What is the purpose of the ‘fieldset’ element in HTML?

A. To define a set of styles for a form.
B. To group related elements in a form.
C. To create a table within a form.
D. To validate form data.

54. How do you add a comment in HTML?

A. ‘//This is a comment//’
B. ‘!–This is a comment–‘
C. ‘This is a comment’
D. ‘–This is a comment–‘

55. Which of the following is the correct way to declare the document type for HTML5?

A. ‘!DOCTYPE HTML5’
B. ‘!DOCTYPE html’
C. ‘!DOCTYPE HTML PUBLIC ‘-//W3C//DTD HTML 5.0//EN”
D. ‘!DOCTYPE html5 PUBLIC ‘-//W3C//DTD HTML 5.0//EN”

56. What is the correct HTML for inserting a background image?

A. ‘background img=’background.gif”
B. ‘body style=’background-image:url(background.gif)’
C. ‘img src=’background.gif’ background’
D. ‘body background=’background.gif”

57. What is the purpose of the ‘viewport’ meta tag in HTML?

A. To define the character set for the HTML document.
B. To control the page’s zoom level.
C. To configure how the page scales to fit different screen sizes.
D. To set the title of the HTML document.

58. Which attribute is used to provide a description of an element that will be read by screen readers?

A. ‘title’
B. ‘alt’
C. ‘aria-label’
D. ‘description’

59. Which tag is used to define an internal style sheet?

A. ‘style’
B. ‘css’
C. ‘script’
D. ‘link’

60. What is the purpose of the ‘template’ element in HTML?

A. To create a reusable HTML structure that is not rendered until it is activated by script.
B. To define a section of the page that will be loaded asynchronously.
C. To embed a video from a remote source.
D. To create a basic layout for a website.

61. What is the purpose of the ‘alt’ attribute in an ‘img’ tag?

A. To specify an alternative style sheet for the image.
B. To provide alternative text for the image if it cannot be displayed.
C. To define the alignment of the image.
D. To add a tooltip to the image when hovered over.

62. What is the purpose of the ‘canvas’ element in HTML5?

A. To display video content.
B. To embed audio files.
C. To draw graphics on the fly, via scripting (usually JavaScript).
D. To create responsive layouts.

63. Which input type allows the user to select a color?

A. ‘color’
B. ‘paint’
C. ‘select-color’
D. ‘hue’

64. What does the HTML ‘noscript’ element do?

A. It defines a section of the page that will not be indexed by search engines.
B. It provides alternative content when a script is not executed.
C. It prevents the execution of scripts on the page.
D. It defines a section of the page that requires JavaScript to function correctly.

65. Which attribute is used to specify the character encoding for an HTML document?

A. ‘charset’
B. ‘encoding’
C. ‘character-set’
D. ‘characters’

66. Which HTML element is used to define the structure of an HTML document, encompassing all other elements?

A. The ‘body’ element
B. The ‘head’ element
C. The ‘html’ element
D. The ‘document’ element

67. Which of the following is the correct HTML for creating a hyperlink?

A. ‘a url=’http://www.example.com’Example Link/a’
B. ‘a href=’http://www.example.com”Example Link”/a’
C. ‘link href=’http://www.example.com”Example Link”/link’
D. ‘a href=’http://www.example.com’Example Link/a’

68. Which input type defines a slider control?

A. ‘slider’
B. ‘range’
C. ‘control’
D. ‘level’

69. Which of the following is NOT a valid HTML5 semantic element?

A. ‘header’
B. ‘article’
C. ‘div’
D. ‘aside’

70. What is the purpose of the ‘details’ and ‘summary’ elements?

A. To create a modal window.
B. To define a section that the user can open and close.
C. To create a tabbed interface.
D. To define a tooltip.

71. Which tag is used to define a navigation list?

A. ‘navigation’
B. ‘nav’
C. ‘link’
D. ‘navigate’

72. What does the ‘abbr’ tag stand for?

A. Absolute Border Box Radius
B. Attribute Based Binding Resource
C. Abbreviation
D. Abstract Base Refinement

73. What is the purpose of the ‘figure’ and ‘figcaption’ elements?

A. To create a floating image.
B. To define a self-contained content and its caption.
C. To create a highlighted section.
D. To define a responsive image.

74. Which HTML element is used to specify a footer for a document or section?

A. ‘bottom’
B. ‘footer’
C. ‘section’
D. ‘foot’

75. Which HTML tag is used to display a picture?

A. ‘image’
B. ‘picture’
C. ‘img’
D. ‘pic’

76. Which HTML tag is used to create a dropdown list?

A. list
B. select
C. dropdown
D. input type=’dropdown’

77. What is the purpose of the ‘figure’ and ‘figcaption’ elements in HTML5?

A. To create a visual chart
B. To define a figure and its caption
C. To add a footer to a page
D. To create a form

78. Which attribute is used to specify the character encoding for an HTML document?

A. charset
B. encoding
C. character
D. code

79. Which of the following HTML tags is used to embed audio content?

A. sound
B. music
C. audio
D. mp3

80. Which of the following input types defines a slider control?

A. slider
B. range
C. level
D. slide

81. What is the purpose of the ‘details’ element in HTML5?

A. To display details of an image
B. To create a detailed table
C. To specify details that the user can view or hide
D. To embed a detailed video

82. Which tag is used to define a section in an HTML document?

A. article
B. div
C. section
D. header

83. Which HTML element is used to display a picture?

A. image
B. picture
C. img
D. icon

84. What does the ‘alt’ attribute in the ‘img’ tag specify?

A. Alternative text if the image cannot be displayed
B. Alignment of the image
C. A link to another image
D. The actual image file

85. What does the HTML ‘canvas’ element do?

A. Defines a container for graphical content
B. Inserts a picture
C. Creates a table
D. Adds a video player

86. What is the correct HTML for creating a hyperlink?

A. a url=’http://www.example.com’>Example
B. a href=’http://www.example.com’>Example
C. a>http://www.example.com
D. a name=’http://www.example.com’>Example

87. What is the purpose of the ‘fieldset’ element in HTML?

A. To group related elements in a form
B. To create a table
C. To define a section in a document
D. To add a footer to a page

88. Which HTML5 element is used to specify a self-contained composition in a document?

A. section
B. article
C. aside
D. nav

89. What is the correct HTML for inserting a background image?

A. body bgimage=’background.gif’
B. background img=’background.gif’
C. body style=’background-image:url(background.gif)’
D. img src=’background.gif’

90. Which HTML tag is used to define an inline frame?

A. frame
B. iframe
C. inlineframe
D. window

91. Which HTML tag is used to define an internal style sheet?

A. style
B. script
C. css
D. link

92. Which attribute is used to define inline styles in HTML?

A. class
B. style
C. font
D. css

93. Which of the following is the correct way to comment out code in HTML?

A. /* This is a comment */
B. // This is a comment
C.
D. This is a comment

94. Which HTML element is used to represent the navigation for a website?

A. navigation
B. nav
C. link
D. menu

95. Which HTML element represents the title of a document?

A. header
B. heading
C. title
D. top

96. What is the main difference between ‘div’ and ‘span’ elements in HTML?

A. ‘div’ is an inline element, while ‘span’ is a block-level element
B. ‘div’ is a block-level element, while ‘span’ is an inline element
C. There is no difference; they are interchangeable
D. ‘div’ is used for text, while ‘span’ is used for images

97. What is the purpose of the ‘viewport’ meta tag in HTML?

A. To define the visible area of a web page for the user
B. To set the background color of the page
C. To specify the character set for the page
D. To add keywords for search engines

98. In HTML, what does the ‘colspan’ attribute specify?

A. The number of columns a table cell should span.
B. The color of the column.
C. The spacing between columns.
D. The width of the column.

99. Which tag is used to create a numbered list in HTML?

A. ul
B. list
C. ol
D. dl

100. Which HTML tag is used to define a definition list?

A. dl
B. ol
C. ul
D. list

101. Which HTML tag is used to define the title of a document?

A. title
B. heading
C. header
D. h1

102. Which HTML tag is used to display an image?

A. img
B. picture
C. icon
D. image

103. Which HTML tag is used to define a paragraph?

A. p
B. paragraph
C. prg
D. text

104. What does HTML stand for?

A. Hyper Text Markup Language
B. Highly Typed Machine Language
C. Home Tool Markup Language
D. Hyperlinks and Text Markup Language

105. What does the ‘doctype’ declaration do?

A. Defines the document type and HTML version
B. Creates a new HTML document
C. Specifies the character set
D. Adds a comment

106. What is the purpose of the ‘meta’ tag in HTML?

A. Defines metadata about an HTML document
B. Creates a new paragraph
C. Inserts an image
D. Defines a hyperlink

107. Which attribute is used to define inline styles?

A. style
B. class
C. id
D. css

108. Which of the following is the correct way to create a hyperlink in HTML?

A. a url=’http://www.example.com’>Example
B. a href=’http://www.example.com’>Example
C. a>Example
D. link href=’http://www.example.com’>Example

109. What is the purpose of the ‘canvas’ element?

A. Used to draw graphics on the fly, via scripting (usually JavaScript)
B. Used to display videos
C. Used to embed audio files
D. Used to create tables

110. Which HTML tag is used to define an internal style sheet?

A. style
B. script
C. css
D. link

111. Which HTML element is used to display a video?

A. video
B. media
C. movie
D. source

112. Which HTML tag is used to define a table row?

A. tr
B. td
C. th
D. table

113. What is the correct HTML for inserting a line break?

A. br
B. lb
C. break
D. newline

114. What is the purpose of the ‘alt’ attribute in the ‘img’ tag?

A. Specifies an alternate image to display
B. Defines alternative text for the image
C. Sets the alignment of the image
D. Adjusts the image size

115. Which HTML tag is used to define a button?

A. button
B. btn
C. input type=’button’
D. element

116. Which of the following is the correct way to add a comment in HTML?

A. !– This is a comment —
B. // This is a comment
C. /* This is a comment */
D. # This is a comment

117. What is the purpose of the ‘colspan’ attribute in a ‘td’ tag?

A. Defines the number of columns a cell should span
B. Defines the number of rows a cell should span
C. Sets the color of the cell
D. Specifies the width of the cell

118. Which attribute is used to link an external CSS file to an HTML document?

A. href
B. src
C. link
D. rel

119. Which HTML tag is used to define a header for a document or a section?

A. header
B. head
C. h1 to h6
D. top

120. What is the purpose of the ‘figcaption’ element?

A. Defines a caption for a ‘figure’ element
B. Defines the main content of a document
C. Defines a footer for a document or section
D. Defines a navigation link

121. Which HTML tag is used to define a list item?

A. li
B. ol
C. ul
D. list

122. What is the purpose of the ‘fieldset’ element?

A. Groups related elements in a form
B. Defines a new font style
C. Creates a new table
D. Inserts a video

123. Which tag is used to define the structure of an HTML document?

A. html
B. head
C. body
D. doctype

124. Which HTML tag is used to create a numbered list?

A. ol
B. ul
C. li
D. dl

125. Which HTML element is used to embed audio content?

A. audio
B. sound
C. music
D. voice

Số câu đã làm: 0/0
Thời gian còn lại: 00:00:00
  • Đã làm
  • Chưa làm
  • Cần kiểm tra lại
Danh mục Đại học
[vnsatp_quiz id="1101"]
Lợi ích của việc mua tên miền cũ
© 2026 Đề Trắc Nghiệm •

Bạn ơi!!! Để xem kết quả, bạn vui lòng làm nhiệm vụ nhỏ xíu này nha

Đang tải nhiệm vụ...

Bước 1: Mở tab mới và truy cập Google.com và tìm kiếm chính xác từ khóa sau:

Bước 2: Tìm và click vào kết quả có trang web giống như hình ảnh dưới đây:

Hướng dẫn tìm kiếm

Nếu không tìm thấy, vui lòng tìm ở trang 2, 3, 4... của kết quả tìm kiếm nhé.

Bước 3: Kéo xuống cuối trang đó để tìm mật khẩu chính là SỐ LƯỢT XEM như hình ảnh hướng dẫn:

Hướng dẫn lấy mật khẩu

Nếu tìm không thấy mã bạn có thể Đổi nhiệm vụ để lấy mã khác nhé.

Bạn ơi!!! Để xem được kết quả, bạn vui lòng làm nhiệm vụ nhỏ xíu này nha

HƯỚNG DẪN TÌM MẬT KHẨU

Đang tải nhiệm vụ...

Bước 1: Mở tab mới và truy cập Google.com. Sau đó tìm kiếm chính xác từ khóa sau:

Bước 2: Tìm và click vào kết quả có trang web giống như hình ảnh dưới đây:

Hướng dẫn tìm kiếm

Bước 3: Kéo xuống cuối trang đó để tìm mật khẩu như hình ảnh hướng dẫn:

Hướng dẫn lấy mật khẩu

Nếu tìm không thấy mã bạn có thể Đổi nhiệm vụ để lấy mã khác nhé.