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
B
Correct answer
Explanation
External JavaScript files saved with .js extension should NOT contain the tag. The <script> tag is only used in HTML files to reference or embed JavaScript. Including script tags in .js files would cause syntax errors.
-
//This is a comment
-
<!--This is a comment-->
-
'This is a comment
-
/*This is a comment
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 */).
-
<!--This comment has more than one line-->
-
//This comment has more than one line//
-
/This comment has more than one line/
-
'This comment has more than one line
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.
-
The server will not accept the request without a valid Content-Length header field.
-
A precondition specified in one or more Request-Header fields returned false.
-
The document/file requested by the client was not found.
-
The request first requires authentication with the proxy.
B
Correct answer
Explanation
HTTP 412 Precondition Failed status code indicates that one or more preconditions specified in request headers (such as If-Match, If-None-Match, If-Modified-Since, or If-Unmodified-Since) evaluated to false. The server is rejecting the request because the condition required for the request was not met.
-
It is a system for classifying content
-
It is generic term for a piece of content on your web site
-
It is software (code) that extends Drupal features and/or functionality
-
It controls how your site is displayed
B
Correct answer
Explanation
In Drupal terminology, a 'node' is the generic term for any piece of content, regardless of its type. Pages, stories, blog posts, forum topics, and any custom content type are all nodes. Nodes share common properties like title, author, creation date, and can have taxonomy terms, comments, and custom fields attached. This abstraction allows Drupal to handle different content types uniformly.
-
template
-
page
-
module
-
theme
D
Correct answer
Explanation
A theme in Drupal is a collection of files (PHP templates, CSS stylesheets, images, and an info file) that determine the website's visual appearance and layout. Themes control how content and modules are rendered to the user, separating presentation from logic. Modules provide functionality, templates are theme files, and 'page' is not a Drupal concept in this context.
-
Taxonomy
-
PHP filter
-
Throttle
-
Statistics
A
Correct answer
Explanation
The Taxonomy module in Drupal provides a system for classifying, categorizing, and organizing content using hierarchical vocabularies and terms. It allows creating tags, categories, or classification systems that can be applied to any content type (node). This enables content organization and retrieval, such as blog post tags or product categories. PHP filter, Throttle, and Statistics serve unrelated purposes.
-
Drupal is an open source CMS
-
Drupal supports only Apache platform
-
Drupal does not support creation of multi-lingual web sites
-
Drupal supports Web based administration
A,D
Correct answer
Explanation
Drupal is indeed an open-source content management system with a web-based administrative interface. It runs on multiple platforms including Apache, Nginx, and IIS, not just Apache. Drupal has robust multi-language support through its localization and internationalization features.
-
Hyper Text Markup Language
-
Home Tool Markup Language
-
Hyperlinks and Text Markup Language
-
Highlight and Text Markup Language
A
Correct answer
Explanation
HTML stands for Hyper Text Markup Language. It is the standard markup language for creating web pages. The other options are made up: Home Tool Markup Language, Hyperlinks and Text Markup Language, and Highlight and Text Markup Language are not real terms.
-
<h6>
-
<head>
-
<h1>
-
<heading>
C
Correct answer
Explanation
HTML headings are numbered from h1 (largest) to h6 (smallest). The tag contains metadata not content. There is no tag in HTML. Therefore
is the correct tag for the largest heading.
-
<background>yellow</background>
-
<body background="yellow">
-
<body style="background-color:yellow">
-
<body bgcolor="yellow">
C
Correct answer
Explanation
The correct way to add background color in modern HTML/CSS is using inline CSS with the style attribute: style="background-color:yellow". The bgcolor attribute and tag are deprecated. Using 'background' attribute on is for images, not colors.
-
<table><tr><td>
-
<table><head><tfoot>
-
<table><tr><tt>
-
<thead><body><tr>
A
Correct answer
Explanation
The core table tags in HTML are for the table, for table rows, and for table data cells. and exist but is for page metadata. is a deprecated text tag. Option A lists the fundamental table structure tags.
-
eXtra Markup Language
-
eXplore Markup Language
-
eXpensive Markup Language
-
eXtensible Markup Language
D
Correct answer
Explanation
XML stands for eXtensible Markup Language. It is a markup language that defines a set of rules for encoding documents in a format that is both human-readable and machine-readable.
B
Correct answer
Explanation
XML is case-sensitive for all element and attribute names. and are different tags, and 'ID' and 'id' are different attributes. This is specified in the XML recommendation and parsers enforce this strictly.
-
<NAME>Write name here</NAME>
-
<name>Write name here</name>
-
<NAme>Write name here</naME>
-
<naME>Write name here</NAme>
A
Correct answer
Explanation
XML tags are strictly case-sensitive. The opening tag must match the closing tag exactly. Distractors mismatch cases between opening and closing tags, which violates XML syntax rules and causes XML parsing errors.