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
-
HTML tags are case sensitive.
-
Some html tags are not required to be closed.
-
The opening and closing html tag is optional.
-
HTML tags can have attributes.
-
HTML tags can be written using any text editor.
A
Correct answer
Explanation
HTML tags are not case sensitive. For example to create a paragraph we can write P or p. The tags in XML are case sensitive.
-
INPUT
-
SUB
-
META
-
CAPTION
-
HEADING
E
Correct answer
Explanation
Heading is not a valid tag in HTML.
-
src
-
align
-
border
-
size
-
alt
D
Correct answer
Explanation
To define the size of the image, the correct attributes are width and height. Size is not a valid attribute of the img tag.
-
input type = textbox
-
input type = text
-
input type = label
-
input type = textfield
-
textarea
B
Correct answer
Explanation
Input type=Text or simply input creates a standard textbox. This can also have a value attribute, which sets the initial text in the textbox.
-
SGML
-
DHTML
-
XML
-
JSP
-
None of the above
A
Correct answer
Explanation
SGML or Standard Generalized Markup Language is the standard technology for defining generalized markup language for documents. HTML is an example of SGML based languages. SGML is not a language in itself but a description of how to specify a language.
-
CSS defines how to display HTML elements.
-
External style sheets are stored in CCS files.
-
Styles were added from HTML 4.0.
-
External style sheets can save a lot of work.
-
A CSS rule has two main parts: a selector, and one or more declarations.
B
Correct answer
Explanation
Style sheets are normally saved in external .CSS files not .CCS files.
E
Correct answer
Explanation
Link is an invalid attribute in the a(anchor) tag.
-
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.
-
It can appear anywhere in an HTML page.
-
!DOCTYPE is not an HTML tag.
-
It does not have an end tag.
-
If the !DOCTYPE is not specified the page will be rendered in quirks mode.
-
The !DOCTYPE refers to DTD.
A
Correct answer
Explanation
The !DOCTYPE declaration must be the very first thing in your HTML document, before the html tag.
-
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