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 technology
  1. <style src="mystyle.css">

  2. <stylesheet>mystyle.css</stylesheet>

  3. <link rel="stylesheet" type="text/css" href="mystyle.css">

  4. None of the above

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

The correct HTML syntax for linking an external style sheet is using the element with rel='stylesheet', type='text/css', and href pointing to the CSS file. The element is for internal styles, not external linking. Option C shows the standard, W3C-recommended syntax that works across all browsers.

Multiple choice technology web technology
  1. font

  2. styles

  3. style

  4. class

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

The style attribute allows you to apply CSS directly to individual HTML elements. It's written as style="property: value;" and takes precedence over external or internal styles. The class attribute references external classes, while font is not a valid style attribute.

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

  2. {body:color=black(body}

  3. body {color: black}

  4. body:color=black

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

CSS syntax requires a selector, followed by curly braces containing property-value pairs separated by colons. Each declaration ends with a semicolon. Option C shows correct syntax: body {color: black;} where body is the selector and color: black is the declaration.

Multiple choice technology web technology
  1. h1.all {background-color:#FFFFFF}

  2. h1 {background-color:#FFFFFF}

  3. all.h1 {background-color:#FFFFFF}

  4. None of the above

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

To style all elements of a specific type in CSS, you use the element selector directly. Therefore, h1 targets all <h1> elements. The other options use class selectors (.all or .h1), which would only target elements with those specific class names rather than all <h1> tags.

Multiple choice technology web technology
  1. text-color:

  2. color:

  3. text-color=

  4. fgcolor:

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

The color CSS property is used to change the text color (foreground color) of an element. There is no text-color or fgcolor property in CSS. The property name is simply color, applied to the text content of the element.

Multiple choice technology programming languages
  1. The type of tag used

  2. The version of the markup language that the source uses

  3. The document type declaration

  4. None

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

The document type declaration (DOCTYPE) informs the parser or markup processor about the specific rules and DTD/schema to use when interpreting the document's tags. While the language version is related, it is the DOCTYPE declaration itself that explicitly instructs the processor. Tag types alone do not define interpretation rules.

Multiple choice technology programming languages
  1. LANGUAGE tag

  2. Document type definition

  3. TYPE tag

  4. Document tag

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

A Document Type Definition (DTD) tells markup language processors which rules to use to interpret a document. DTDs define the structure, elements, and attributes allowed in a document, providing the validation rules. LANGUAGE and TYPE tags are not standard markup concepts.

Multiple choice technology programming languages
  1. It describes the tags in existing languages

  2. It defines new markup languages

  3. It parses the code in existing markup languages

  4. All

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

A metamarkup language defines new markup languages. XML is the classic example - it's used to define other markup languages like XHTML, SVG, or custom XML applications. It doesn't describe or parse existing languages but provides the framework for creating new ones.

Multiple choice technology programming languages
  1. Programming events

  2. Text appearance

  3. Relationships between data

  4. Text structure

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

Markup languages like HTML or XML define document structure and formatting. Text appearance (B) is controlled through styling tags and attributes, while text structure (D) is defined through hierarchical element organization. Programming events and data relationships are handled by programming languages, not markup languages.

Multiple choice technology web technology
  1. True

  2. False

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

XML was designed to complement HTML, not replace it. HTML defines the structure and presentation of web pages, while XML provides a flexible, extensible way to structure and describe data. They serve different purposes: HTML is for displaying information, XML is for storing and transporting structured data. The two technologies can work together (e.g., XHTML).

Multiple choice technology web technology
  1. eXtra Style Language

  2. eXpandable Style Language

  3. eXtensible Style Listing

  4. eXtensible Stylesheet Language

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

XSL stands for eXtensible Stylesheet Language, a family of languages used to transform and render XML documents. It includes XSLT (for transformations), XSL-FO (for formatting), and XPath (for navigating XML documents). XSL defines how XML data should be displayed or converted to other formats.

Multiple choice technology web technology
  1. XML uses a description node to describe data

  2. XML uses a DTD to describe the data

  3. XML uses XSL to describe data

  4. None of the above

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

A Document Type Definition (DTD) is a traditional way to describe the structure, elements, and attributes of an XML document. While XSL is used for styling and transforming XML data, it does not describe the data structure itself. Description nodes do not exist in standard XML.

Multiple choice technology web technology
  1. True

  2. False

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

This XML document is NOT well-formed because the attribute value 'age=29' is not enclosed in quotes. XML requires all attribute values to be quoted (either single or double quotes). The correct syntax would be or . Well-formedness is a strict requirement - any violation of XML syntax rules makes the document invalid.