Computer Knowledge

Markup and Web Languages

1,492 Questions

Test your understanding of HTML tags, XML structures, and web page creation technologies. The questions cover elements like CSS styling, parsing documents, and defining web attributes. This section is essential for candidates appearing for computer proficiency tests in various competitive exams.

HTML tags and attributesXML document parsingCSS styling levelsWeb page creation basicsBrowser compatibility

Markup and Web Languages Questions

Multiple choice technology web 2.0
  1. body {color: black}

  2. {body;color:black}

  3. {body:color=black(body}

  4. body:color=black

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

CSS syntax uses the format: selector { property: value; }. The correct form is 'body { color: black; }' where 'body' is the selector, 'color' is the property, and 'black' is the value.

Multiple choice technology web 2.0
  1. p {font-weight:bold}

  2. <p style="font-size:bold">

  3. p {text-size:bold}

  4. <p style="text-size:bold">

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The correct CSS property for making text bold is font-weight with value bold. Option A uses the correct CSS syntax with a selector (p) and property-value pair (font-weight:bold). Options B and D incorrectly use inline style syntax with font-size or text-size, which are not properties for bold text. Option C uses the non-existent property text-size.

Multiple choice technology web 2.0
  1. True

  2. False

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

CSS is not limited to HTML - it can style XML documents, SVG graphics, and other markup languages. The statement claims CSS can only style HTML webpages, which is false. CSS is a general-purpose styling language.

Multiple choice technology web 2.0
  1. display

  2. view

  3. visibility

  4. z-index

Reveal answer Fill a bubble to check yourself
A,C Correct answer
Explanation

Two main CSS properties can hide elements: display:none removes the element completely from the layout, while visibility:hidden hides it visually but maintains its space in the layout. Options A and C are both correct. The 'view' property doesn't exist, and z-index only controls stacking order.

Multiple choice technology web 2.0
  1. display

  2. position

  3. z-index

  4. depth

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The CSS z-index property determines the stack order of elements that overlap. Elements with a larger z-index cover those with a smaller z-index. The display and position properties control layout and placement, while depth is not a valid CSS property.

Multiple choice technology web technology
  1. Example Markup Language

  2. X-Markup Language

  3. eXtra Modern Link

  4. eXtensible Markup Language

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

XML stands for eXtensible Markup Language, where the 'X' represents 'eXtensible' indicating that users can define their own custom tags and markup structures. This extensibility is what distinguishes XML from fixed markup languages like HTML. Options A, B, and C are made-up expansions.

Multiple choice technology web technology
  1. In XML,both the tag semantics and the tag set are fixed

  2. XML is a meta-language for describing markup languages

  3. XML is a restricted form of SGML

  4. All the above

Reveal answer Fill a bubble to check yourself
B,C Correct answer
Explanation

XML is a meta-language for defining markup languages (option B), meaning it provides rules for creating custom tag sets rather than having fixed tags. XML is indeed a restricted form of SGML (option C), designed to be simpler while retaining SGML's extensibility. Option A is false because XML's tag semantics and tag sets are not fixed.

Multiple choice technology web technology
  1. XML elements must have a closing tag

  2. XML tags must be lower case

  3. XML elements must be properly nested

  4. XML attribute values must be quoted

Reveal answer Fill a bubble to check yourself
A,C,D Correct answer
Explanation

XML requires all elements to have closing tags (A) and be properly nested (C). Attribute values must be quoted (D). However, XML tags are case-sensitive but not required to be lowercase (B is false) - 'Name' and 'name' are different tags, but uppercase is valid. These rules ensure well-formed XML documents.

Multiple choice technology web technology
  1. True

  2. False

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

XML comments are not part of the document's textual content - they are metadata. XML processors are NOT required to pass comments to applications, and applications typically cannot access them through standard DOM/SAX parsing APIs. This distinguishes comments from actual document data.

Multiple choice technology web technology
  1. <?xml version="1.0" />

  2. <?xml version="1.0"?>

  3. <xml version="1.0" />

  4. None of the above

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The XML version declaration must use the processing instruction syntax with both opening and closing question marks: . Option A incorrectly closes with />, which is only used for empty elements. Option C omits the required question marks. The declaration must appear at the very start of an XML document.

Multiple choice technology web technology
  1. <7lastname>

  2. <lastname>

  3. <last name>

  4. <last_name>

Reveal answer Fill a bubble to check yourself
A,C Correct answer
Explanation

XML element names must follow strict naming rules. They cannot start with a number (7lastname is invalid) and cannot contain spaces (last name is invalid). Valid names like lastname and last_name follow the rules: starting with a letter or underscore, and containing only letters, digits, hyphens, underscores, or periods.

Multiple choice technology web technology
  1. Names cannot start with a number or punctuation character

  2. Names cannot start with the letters xml (or XML, or Xml, etc)

  3. Names can contain spaces

  4. All the above

Reveal answer Fill a bubble to check yourself
A,B Correct answer
Explanation

XML element names must follow specific rules: they cannot start with numbers or punctuation characters (statement A is true), and they cannot start with 'xml' in any case combination as this is reserved (statement B is true). Statement C is false because spaces are not allowed in XML names. Therefore, 'All the above' (D) is incorrect.