Skip to content
GK24
Computer AwarenessMedium

What is the correct syntax for writing a comment in HTML?

  1. A.// this is a comment
  2. B.<!-- this is a comment -->
  3. C./* this is a comment */
  4. D.<comment> this is a comment </comment>

Correct answer

B. <!-- this is a comment -->

Explanation

The correct answer is B, a comment opening with an angle bracket, an exclamation mark and two hyphens and closing with two hyphens and an angle bracket. The browser ignores everything between them, so comments are used to explain the code to other developers or to switch a block of markup off temporarily without deleting it. A is wrong because two forward slashes begin a single line comment in C, C plus plus, Java and JavaScript, not in HTML. C is wrong because a slash and an asterisk delimit a multi-line comment in those same languages and in CSS, so this is the syntax used inside a style sheet rather than in markup. D is wrong because HTML has no comment element; writing such a tag would simply leave an unknown element in the document, and the text inside it would still be displayed.

Read the full article: HTML and Web Designing Basics: Tags and Attributes

View all
Q1.Computer AwarenessAsked in: Delhi · 7 Aug 2021, Shift 2Medium

Which CSS property allows you to set multiple list properties at once?

  1. A.list-style-type
  2. B.list-style
  3. C.list-style-position
  4. D.list-style-image
Show answer
Correct answer: B. list-style

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.

Q3.Computer AwarenessAsked in: Rajasthan · RSSB Informatics Assistant 2018 OfficialEasy

The basic elements of a form are called

  1. A.objects
  2. B.table
  3. C.record
  4. D.controls
Show answer
Correct answer: D. controls

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.

Q4.Computer AwarenessEasy

HTML stands for

  1. A.HyperText Markup Language
  2. B.HighText Machine Language
  3. C.HyperTransfer Markup Language
  4. D.Hyperlink Text Making Language
Show answer
Correct answer: A. HyperText Markup Language

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.

Q5.Computer AwarenessEasy

Who is credited with developing HTML and the World Wide Web?

  1. A.Charles Babbage
  2. B.Tim Berners-Lee
  3. C.Dennis Ritchie
  4. D.Vint Cerf
Show answer
Correct answer: B. Tim Berners-Lee

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.