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. SOAP is for HTTP only

  2. SOAP can be used in combination with any protocol that can carry a SOAP envelope

  3. All the above

  4. none of the above

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

SOAP is protocol-agnostic. While commonly used with HTTP, SOAP envelopes can be transported over any protocol that can carry XML/text - SMTP, JMS, TCP, etc. Option A incorrectly restricts SOAP to HTTP only.

Multiple choice technology programming languages
  1. <actionpath="/r4r" type="org.apache.struts.webapp.example.EditSubscriptionAction" name="r4rForm" scope="request" validate="false"> <forward name="failure" path="/index.jsp"/> <forward name="success" path="/admin.jsp"/> </action>

  2. .<action classpath="/r4r" type="org.apache.struts.webapp.example.EditSubscriptionAction" name="r4rForm" scope="request" validate="false"> <forward name="failure" path="/index.jsp"/> <forward name="success" path="/admin.jsp"/> </action

  3. <action path="/r4r" type="org.apache.struts.webapp.example.EditSubscriptionAction" id="r4rForm" scope="request" validate="false"> <forward name="failure" path="/index.jsp"/> <forward name="success" path="/admin.jsp"/> </action>

  4. None

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

In Struts config, the tag uses 'path' (not 'classpath' or 'actionpath') to specify the URL mapping. Option A is correct with path="/r4r". Option B incorrectly uses 'classpath' and has a typo with '.' before action. Option C incorrectly uses 'id' instead of 'name'. The correct attribute for associating a form bean with an action is 'name'.

Multiple choice technology programming languages
  1. Always converts HTML markup to entity equivalents, like <

  2. Never converts HTML markup to entity equivalents

  3. Converts markup when filter=true

  4. Converts markup when markup=false

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

The tag has a 'filter' attribute that controls HTML escaping. When filter='true' (or filter is not specified, as true is default), the tag converts HTML markup characters like <, >, &, ' to their entity equivalents (<, >, &, ') to prevent XSS attacks. When filter='false', it outputs content as-is without conversion.

Multiple choice technology web technology
  1. style

  2. font

  3. class

  4. styles

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

The correct answer is A. "style" is the HTML attribute used to define inline styles. This attribute is applied directly to the HTML element and allows you to specify CSS styles for that particular element.

Let's go through the other options and explain why they are incorrect:

B. "font": This attribute is not used to define inline styles. It was commonly used in older versions of HTML to specify font-related styles, but it is now considered deprecated and should be avoided.

C. "class": The "class" attribute is used to define a class for an HTML element, which can be used to apply styles defined in CSS. However, it is not specifically used for defining inline styles.

D. "styles": This is not a valid HTML attribute. The correct attribute is "style".

So, the correct answer is A. "style".

Multiple choice technology web technology
  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: selector { property: value; }. The selector (body) is followed by curly braces containing property-value pairs separated by colons. Option A shows this correctly. Option B reverses the order, Option C uses invalid syntax, and Option D uses a colon incorrectly.

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

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

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

  4. None of the above

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

CSS uses element selectors directly followed by property declarations in curly braces. The background-color property sets the background color, and #FFFFFF represents white in hex color notation. Options B and C use incorrect selector syntax with 'all' keyword.

Multiple choice technology web technology
  1. <p style="text-size:bold">

  2. p {font-weight:bold}

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

  4. p {text-size:bold}

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

The font-weight property controls text boldness in CSS. Option B uses correct CSS syntax: 'p' selector with font-weight:bold property declaration. Options A and C incorrectly mix inline style syntax with wrong property names.

Multiple choice technology programming languages
  1. /text

  2. /doc

  3. /xml

  4. /help

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

The C# compiler switch /doc extracts XML documentation comments (///) from source code and generates an XML documentation file. Options /text, /xml, and /help are not valid compiler switches for this purpose. The /doc switch is commonly used for generating API documentation.