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
-
<thead><body><tr>
-
<table><head><tfoot>
-
<table><tr><td>
-
<table><tr><tt>
C
Correct answer
Explanation
A complete HTML table structure uses as the container, for table rows, and for table data cells. Option A incorrectly uses (not a table tag), option B uses (an HTML document element, not a table element), and option D uses (teletype text, not a table tag).
-
<img>image.gif</img>
-
<image src="image.gif" />
-
<img href="image.gif />
-
<img src="image.gif" />
D
Correct answer
Explanation
The
tag with the src attribute is the correct syntax for inserting images in HTML. Option A uses incorrect closing syntax (images are self-closing), option B uses a non-existent tag, and option C uses href instead of src.
C
Correct answer
Explanation
ASP.NET Web Handler files use the .ashx extension. ASHX files are used for HTTP handlers that process web requests. ASPX is for regular ASP.NET pages, ASCX is for user controls, and ASMx is a typo.
A
Correct answer
Explanation
HTML files use the .html extension (or .htm as a shorter variant). HTA is for HTML Applications, HTX is an older index server extension, and httml is not a valid extension. HTML is the standard markup language for web pages.
C
Correct answer
Explanation
ASHX is the file extension for ASP.NET Generic Handlers, which process HTTP requests without the overhead of a full web page. They're used for AJAX calls, file downloads, and lightweight HTTP endpoints.
A
Correct answer
Explanation
HTML files use the .html extension (and the shorter .htm variant). These contain markup code that web browsers render as web pages. HTML is the standard language for creating web pages.
-
Null elements
-
Empty elements
-
No elements
-
Zero elements
B
Correct answer
Explanation
HTML elements without content are called Empty elements. They don't have closing tags and can't contain child elements. Examples include
,
, ,
, . They are self-contained and defined by their attributes alone.
-
the <noscript> tag
-
the <altscript> tag
-
the <alttext> tag
-
the <nullscript> tag
A
Correct answer
Explanation
The tag defines alternative content that displays when scripts are disabled or not supported. It's essential for graceful degradation - browsers with JavaScript off see the noscript content instead. There is no or tag in HTML.
A
Correct answer
Explanation
HTML provides six levels of headings using
through tags, where h1 represents the main heading and h6 the lowest-level subheading. These are semantic tags that convey document structure.
-
ControlToValidate property
-
Text property
-
Both A) and B)
-
None of the Above
C
Correct answer
Explanation
Every validation control in ASP.NET requires the ControlToValidate property to specify which input control to validate. Additionally, validation controls support the Text property to display validation error messages. Therefore, both properties are found in validation controls.
-
< allow >
-
< deny >
-
Both A) and B)
-
None of the Above
C
Correct answer
Explanation
ASP.NET authorization sections use both and elements to control access rules. These elements specify which users or roles can or cannot access specific resources, forming the complete authorization framework.
-
@Register directive.
-
@Page directive.
-
@control directive.
-
All the above
B
Correct answer
Explanation
The @Page directive is used in ASP.NET to define page-specific attributes like the programming language, master page file, or other configuration settings at the top of an .aspx file. @Register is used for registering user controls and custom tag prefixes, while @control is not a standard ASP.NET directive.
B
Correct answer
Explanation
XML elements can be closed in two ways: with a separate closing tag () OR as a self-closing tag (). Self-closing tags don't require a separate closing tag, making the statement false.