Which of the following is an empty tag in HTML?
- A.The paragraph tag
- B.The line break tag
- C.The table tag
- D.The anchor tag
Correct answer
Explanation
The correct answer is B, the line break tag. An empty or void tag has no closing tag because it encloses no content; it simply performs an action at the point where it is written, and the line break tag, written as br, moves the following text to a new line. The other standard empty tags are hr for a horizontal rule, img for an image and input for a form control. A is wrong because the paragraph tag is a container: it has an opening and a closing tag and the text of the paragraph sits between them. C is wrong because the table tag is a container that encloses rows and cells, and leaving it unclosed breaks the layout. D is wrong because the anchor tag is a container too; the words that become clickable are placed between its opening and closing tags, while the destination goes in the href attribute.
Read the full article: HTML and Web Designing Basics: Tags and Attributes
Practice Questions
View allWhich CSS property allows you to set multiple list properties at once?
- A.list-style-type
- B.list-style
- C.list-style-position
- D.list-style-image
Show answer
It is a shorthand property, which means it sets several related properties in a single declaration: the type of the marker, its position and an image to use as the marker, in any order and with the omitted ones falling back to their default values.
Read the full explanation →Which HTML element contains all the content that is visible to the visitor on a web page?
- A.The head element
- B.The title element
- C.The body element
- D.The meta element
Show answer
An HTML document has two parts inside the html element, and the body is the one that holds everything the visitor actually sees: headings, paragraphs, images, tables, lists, links and forms.
Read the full explanation →The basic elements of a form are called
- A.objects
- B.table
- C.record
- D.controls
Show answer
A form is the part of a page that collects information from the visitor, and the individual items placed in it to receive that information are called controls, or form controls: the text box, password box, radio button, check box, drop-down list, text area, submit button and reset button.
Read the full explanation →HTML stands for
- A.HyperText Markup Language
- B.HighText Machine Language
- C.HyperTransfer Markup Language
- D.Hyperlink Text Making Language
Show answer
Hypertext means text that carries links to other text, so that a reader can jump from one document to another instead of reading in a fixed order, and markup means the system of tags that labels each part of the content for the browser.
Read the full explanation →Who is credited with developing HTML and the World Wide Web?
- A.Charles Babbage
- B.Tim Berners-Lee
- C.Dennis Ritchie
- D.Vint Cerf
Show answer
Working at CERN, the European nuclear research organisation, he proposed a hypertext system in 1989 and by 1991 had written HTML, the first web browser and the first web server, and he went on to found the World Wide Web Consortium, which maintains the standards.
Read the full explanation →