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
-
p {text-size:bold;}
-
p {text-size=bold;}
-
p {font-weight:bold;}
-
p style=text-size:bold;
-
p={text-size:bold}
C
Correct answer
Explanation
The font-weight property sets how thick or thin characters in text should be displayed. It can be used to display the text in bold letters.
D
Correct answer
Explanation
The h6 tag is the smallest heading tag. If some text is written inside a h6 and /h6 tag, it appears in bold but small letters. It can be used to display headings of a specific topic in a webpage.
-
division
-
frame
-
div
-
table
-
body
C
Correct answer
Explanation
The div tag defines a division or a section in an HTML document. It is also used to group block-elements to format them with CSS.
-
fieldset
-
option
-
select
-
choice
-
input
D
Correct answer
Explanation
Choice is not a valid html form element.
-
The class selector is used to specify a style for a single, unique element.
-
The class selector is defined with '.' (dot).
-
Class name should comprise only alpha numeric characters, and hyphens.
-
The name of the class can be as desired by the user.
-
It is used with style sheets.
A
Correct answer
Explanation
The id selector is used to specify a style for a single, unique element whereas the class selector is used to specify a style for a group of elements. Unlike the id selector, the class selector is most often used on several elements.
-
checked
-
value
-
name
-
type
-
selected
E
Correct answer
Explanation
Selected is not a valid attribute of a Radio Button. To select a Radio Button the attribute checked is used.
-
acronym
-
code
-
dd
-
blockquote
-
cite
A
Correct answer
Explanation
The acronym tag defines an acronym.An acronym can be spoken as if it were a word, example HTML, ASP, etc. By marking up acronyms we can give useful information to browsers, spell checkers, translation systems and search-engine indexers. It has been replace by the abbr tag in HTML 5
-
iframe
-
inframe
-
form
-
frame
-
frameset
A
Correct answer
Explanation
The HTML iframe tag is used to specify an inline frame. An inline frame allows us to embed another document within the current HTML document. We can use the iframe src attribute to specify the source of the other document, as well as other attributes to determine the height, width, scrolling properties, border, etc.
-
onabort
-
onerror
-
onunload
-
onblur
-
onimageunload
B
Correct answer
Explanation
The onerror event triggers when an image does not load properly. It can be written as onerror="error handling code"
-
href
-
hash
-
hostname
-
pathname
-
host
A
Correct answer
Explanation
The href property of the 'Location' object returns the entire path or URL of the current page.
-
onblur
-
onfocuslost
-
onunload
-
onreset
-
onchange
A
Correct answer
Explanation
The onblur event occurs when a control on the form loses it focus. This event is mainly used for data validation purpose when the user tries to leave a control after filling the data.
-
The content of a webpage can be changed dynamically using InnerHTML.
-
The id of an element can be referred by using getElement() method.
-
InnerHTML is not a part of DOM.
-
It was introduced by Microsoft.
-
It is valid for both block and inline elements.
B
Correct answer
Explanation
Each element that we want to modify dynamically must be assigned a unique id. The InnerHTML property is used along with the getElementById() method to refer to a particular element by using its Id.
-
The tag under a keyword string is possible.
-
The tag under a Hex colour is possible.
-
The tag under a reference to another resource type is possible.
-
The tag under another item tag is possible.
-
-
D
Correct answer
Explanation
<item> tag in another item tag is not possible. A Keyword string, Hex colour and a reference to another resource type are possible values to an <item> tag.
-
entity
-
switch board
-
macro
-
pages
-
none of these
A
Correct answer
Explanation
In database design and Entity-Relationship modeling, attributes are properties or characteristics that describe entities. Entities are the objects/concepts (like Customer, Product), while attributes are their details (like CustomerName, Price). Switchboards, macros, and pages are Access interface elements, not structural database components that have attributes.
-
Web Service Method ()
-
Web Method ()
-
Web Services ()
-
Services Method ()
B
Correct answer
Explanation
In .NET ASMX web services, methods must be marked with the [WebMethod] attribute to be exposed as callable web service operations. This attribute enables the method to be invoked via SOAP/HTTP requests. Without it, the method remains internal to the class.