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. <body style="background-color:yellow">

  2. <background>yellow</background>

  3. <body background="yellow">

  4. <body backcolor=”yellow“>

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

Inline CSS is the modern way to set a background color, using `. The other forms are deprecated (background` attribute) or nonsensical tags, making the stored answer the correct one.

Multiple choice technology web technology
  1. <table><head><tfoot>

  2. <thead><body><tr>

  3. <table><tr><tt>

  4. <table><tr><td>

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

A complete structure includes the table element itself, a row (), and a cell (). The option provides exactly those tags, while the other choices contain non‑table elements or malformed tags.

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

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

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

  4. <back-image img="background.gif">

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

The background attribute on the element sets a page background image in traditional HTML. Modern practice uses CSS, but this syntax remains valid. and are not real HTML elements.

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

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

  3. <img>image.gif</img>

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

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

The tag with src attribute is the correct syntax for images. It is a self-closing element ending with /> in XHTML. is not valid, the path goes in src not href, and does not wrap content.

Multiple choice technology programming languages
  1. Alphabetical order

  2. Random. No order.

  3. Argument-declaration order

  4. Based on the datatype

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

Javadoc @param tags should follow the same order as parameters appear in the method or constructor declaration. This convention ensures documentation consistency with the actual code signature, making it easier for developers to correlate documentation with implementation.

Multiple choice technology programming languages
  1. @exception

  2. @throwing

  3. @threw

  4. @except

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

The @exception tag is a complete synonym for @throws in Javadoc. Both tags serve the identical purpose of documenting exceptions that a method may throw, and Javadoc treats them identically. The @throws tag is more commonly used in modern practice.

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

  2. "Hello World"

  3. document.write("Hello World")

  4. ("Hello World")

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

The correct JavaScript syntax to output text is document.write("Hello World"). The document object's write() method outputs text to the HTML document. Response.write() is ASP syntax, and just writing the string or parentheses alone are not valid JavaScript.

Multiple choice technology web technology
  1. The <body> section

  2. Both the <head> section and the <body> section are correct

  3. The <head> section

  4. None of the above

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

JavaScript can be placed in either the or section. While placing scripts at the end of the body is often recommended for performance, both locations are technically valid. The section is useful for functions that should be loaded before the page content.

Multiple choice technology web technology
  1. <script src="xxx.js">

  2. <script name="xxx.js">

  3. <script href="xxx.js">

  4. <script id="xxx.js">

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

The HTML `tag uses thesrc(source) attribute to link external JavaScript files like "xxx.js". Usinghrefis incorrect because it is reserved for stylesheets and links, whilenameandid` are used for identifying elements, not loading external files.