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 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. True

  2. False

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

JSP allows embedding Java code directly within HTML pages using special tags. While you can technically rename an HTML file to .jsp, the statement describes the basic concept that JSP combines Java logic with HTML presentation. However, the file would need actual Java code in JSP tags to be meaningful.

Multiple choice technology web technology
  1. Yes, but the only tags available relate to database access.

  2. No. To iterate over a collection of values, one must use scriptlet code.

  3. No, but there is a standard <iterate> tag that may be used.

  4. Yes, but custom tags will not help developers create tags for use in iterating over a collection.

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

Custom tags were introduced in JSP 1.1, not JSP 1.0. To iterate over collections in JSP 1.0, developers had to write scriptlet code (<% %> loops) directly in the JSP page. There was no standard tag in JSP 1.0, and custom tags did not exist at all in that version.

Multiple choice technology web technology
  1. True

  2. False

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

A JSP tag library is exactly that - a collection of custom tags encapsulating reusable functionality. Tag libraries allow developers to define custom actions that can be used in JSP pages, promoting code reuse and separating presentation from business logic. This is a fundamental concept in JSP tag extension mechanisms.

Multiple choice technology databases
  1. sp_xml_postdocument

  2. sp_xml_readdocument

  3. sp_xml_loaddocument

  4. sp_xml_preparedocument

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

sp_xml_preparedocument is the correct system stored procedure that parses an XML document and returns a handle that can be used with OPENXML. The other options are่™šๆž„็š„ names that don't exist in SQL Server. After use, the document handle should be freed with sp_xml_removedocument to avoid memory leaks.

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.

Multiple choice technology web technology
  1. //This is a comment

  2. <!--This is a comment-->

  3. 'This is a comment

  4. /*This is a comment

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

JavaScript uses // for single-line comments. Option A is correct. Option B is HTML comment syntax, option C is not valid comment syntax, and option D is incomplete (multi-line comments need both /* and */).

Multiple choice technology web technology
  1. <!--This comment has more than one line-->

  2. //This comment has more than one line//

  3. /This comment has more than one line/

  4. 'This comment has more than one line

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

JavaScript multi-line comments use /* to open and */ to close. Option C is correct. Option A is HTML syntax, option B is two single-line comments which won't work for multiple lines, and option D is not valid comment syntax.