Computer Knowledge

Markup and Web Languages

1,701 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. split()

  2. document.clear()

  3. join()

  4. charAt()

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

Among the options, charAt() is a standard string method that was supported in MSIE 3.x. It returns the character at a specified index in a string. Options A (split), B (document.clear), and C (join) were not supported in MSIE 3.x - these methods were added in later versions of JavaScript.

Multiple choice technology web technology
  1. The duration of the browser session.

  2. The duration the current document stays loaded.

  3. Twenty-four hours from the time the cookie is set.

  4. There is no default setting.

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

By default, if the expires or max-age attribute is omitted from a cookie, it behaves as a session cookie. This means the cookie expires and is deleted when the user closes the browser session, making the first option correct.

Multiple choice technology web 2.0
  1. "Hello World";

  2. echo "Hello World";

  3. Document.Write("Hello World");

  4. print("Hello World");

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

In PHP, the standard way to output text to the browser is using the echo language construct or the print function. While print("Hello World"); is also valid syntax, echo "Hello World"; is the widely accepted correct answer in basic PHP quizzes. Option 593320 lacks an output keyword, and Document.Write is JavaScript.

Multiple choice technology web technology
  1. ("Hello World")

  2. document.write("Hello World")

  3. response.write("Hello World")

  4. "Hello World"

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

To write text to a webpage in JavaScript, you use document.write() which outputs content to the document. Option A is just a string literal, option C uses response.write() which is server-side, and option D is just a string without writing it to the document.

Multiple choice technology web technology
  1. <script type="text/javascript" name="javascript.js">

  2. <script type="text/javascript" src="javascript.js">

  3. <script type="text/javascript" href="javascript.js">

  4. <script type="text/javascript" link="javascript.js">

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

The correct HTML tag to include an external JavaScript file is `with thesrcattribute pointing to the script's URL. Attributes likehref,link, orname` are incorrect for linking scripts in HTML.

Multiple choice technology web technology
  1. Both the <head> section and the <body> section are correct

  2. The <body> section

  3. The <head> section

  4. The <JavaScript> section

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

JavaScript can be inserted in both the section and the section of an HTML document. The section doesn't exist in HTML, and while both head and body work, the question asks for the correct place implying either is acceptable.

Multiple choice technology web technology
  1. Home Tool Markup Language

  2. Hyperlinks and Text Marking Language

  3. Hyper Text Markup Language

  4. Hyperlinks and Text Markup Language

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

HTML stands for Hyper Text Markup Language. 'HyperText' refers to links that connect pages, 'Markup' means tags that define elements, and 'Language' indicates it's a coding language. Options A, B, and D are incorrect expansions - HTML specifically uses 'Markup' not 'Marking' or 'Marking Language'.

Multiple choice technology web technology
  1. <input type="checkbox" />

  2. <check>

  3. <input type="check" />

  4. <checkbox>

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

HTML checkboxes are created using the input element with type="checkbox". Options B and D use non-existent HTML tags and , while option C uses type="check" which is not a valid input type. Option A is the only correct syntax.

Multiple choice technology web technology
  1. <img>image.gif</img>

  2. <image src="image.gif" />

  3. <img src="image.gif" />

  4. <img href="image.gif />

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

Images in HTML are inserted using the self-closing img tag with the src attribute specifying the image path. Option A incorrectly uses closing tags, option B uses the non-existent tag, and option D uses 'href' instead of 'src'. Only option C uses the correct img tag syntax.

Multiple choice technology web technology
  1. <background img="background.gif">

  2. <img src background="background.gif" background />

  3. <body background="background.gif">

  4. <img src="background.gif" background />

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

In traditional HTML, background images were set using the background attribute on the body tag. While modern practices use CSS, option C shows the correct HTML attribute syntax. Options A and B use non-existent attributes or tags, and option D places background as a standalone attribute without the body tag.

Multiple choice technology programming languages
  1. eXtensible Markup Language

  2. Example Markup Language

  3. X-Markup Language

  4. eXtra Modern Link

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

XML stands for eXtensible Markup Language, a widely used format for storing and transporting data. Option A is correct - it represents the full form accurately. Options B, C, and D are incorrect expansions that don't match the actual meaning of XML.