Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

1.

What is the format for character entity reference?(a) &name;(b) $name;(c) %name;(d) !name;This question was addressed to me in an online interview.The origin of the question is HTML 4.x and XHTML 1.x Character Entities in section HTML and XHTML Fundamentals of HTML

Answer» CORRECT answer is (a) &NAME;

Easy explanation: The format for character entity REFERENCE is &name; name is case-sensitive alphanumeric string and SEMICOLON is necessary.
2.

Which parameter is commonly used for size attribute?(a) centimeter(b) pixels(c) inch(d) millimeterI have been asked this question by my college professor while I was bunking the class.My question is based upon Common HTML5 Attributes Reference in portion HTML and XHTML Fundamentals of HTML

Answer»

The correct answer is (b) pixels

The BEST explanation: Size is an attribute commonly used with and

3.

Which entity is not defined in XML?(a) quot(b) apos(c) gt(d) copyThis question was posed to me in an interview.I'm obligated to ask this question of HTML 4.x and XHTML 1.x Character Entities topic in portion HTML and XHTML Fundamentals of HTML

Answer»

The CORRECT option is (d) copy

To elaborate: There is only five entity in XML that are predefined and those are quot, It, gt, apos, AMP. Copy is used in HTML, quot, apos, gt was first INTRODUCED by XHTML 1.0. Copy was first introduced by HTML 3.2. Unicode code point for copy is U+00A9.

4.

For entity which term is used by XML?(a) character entity reference(b) numeric character reference(c) predefined entities(d) character and numeric entity referenceI had been asked this question during an interview.Enquiry is from HTML 4.x and XHTML 1.x Character Entities in chapter HTML and XHTML Fundamentals of HTML

Answer»

Correct answer is (c) predefined entities

Explanation: “character ENTITY reference” term is not used by XML instead XML defines five “predefined entities” which are & [&], < [<], > [>], " [“] and ' [‘].

5.

Which entity is for inverted question mark?(a) &iquest(b) &oline(c) &permil(d) &primeThe question was asked during an interview for a job.I'd like to ask this question from HTML 4.x and XHTML 1.x Character Entities in section HTML and XHTML Fundamentals of HTML

Answer»

Correct answer is (a) &iquest

To explain: For INVERTED question mark we used &iquest, &oline is for overline, &permil is for per mille, &PRIME is for feet SIGN. In NUMBER &iquest is ¿, &olin is 8254, &permil is ‰, &prime is ′.

6.

Which of the following entity is for shape?(a) &uarr(b) &loz(c) &rarr(d) &larrI have been asked this question in a job interview.My query is from HTML 4.x and XHTML 1.x Character Entities in division HTML and XHTML Fundamentals of HTML

Answer» CORRECT choice is (b) &loz

The explanation is: &loz is for the SHAPE LOZENGE, &UARR is for upward arrow, &rarr for RIGHTWARDS arrow, &larr for leftwards double arrow. The number for &uarr is ↑, for &loz is ◊, for &rarr is →, for &larr is ←.
7.

Which of the following is the attribute that is used to set a global identifier for a microdata item?(a) key(b) id(c) itemclass(d) itemidThis question was posed to me during an online exam.This interesting question is from HTML and XHTML Element Reference topic in section HTML and XHTML Fundamentals of HTML

Answer» RIGHT option is (d) itemid

To explain I would say: The unique id for an element in html is specified by id attribute. Itemmid ALLOWS a vocabulary to DEFINE a global identifier for a microdata item, for example an ISBN number on a BOOK. Use itemid on the same element as the item’s itemscope and itemtype attributes.
8.

For latin letter u with acute which entity is used?(a) &ucirc(b) &ugrave(c) &ucirc(d) &uacuteI had been asked this question in quiz.My query is from HTML 4.x and XHTML 1.x Character Entities in portion HTML and XHTML Fundamentals of HTML

Answer»

Right OPTION is (d) &uacute

Best explanation: &uacute defines latin letter u with ACUTE, &ucirc is for u with CIRCUMFLEX, &ugrave is for u with a GRAVE.

9.

What is the correct format of numeric character reference?(a) &nnnn;(b) &#nnnn;(c) #nnnn;(d) $*nnnn;I got this question in unit test.I would like to ask this question from HTML 4.x and XHTML 1.x Character Entities topic in division HTML and XHTML Fundamentals of HTML

Answer»

Right answer is (b) nnnn;

Best explanation: NUMERIC character reference uses the format nnnn, nnnn represents DECIMAL format. We can ALSO use hhhh in PLACE of nnnn for hexadecimal form and its syntax will be like hhhh; In XML documents use nnnn; semicolon is MANDATORY.

10.

What is the use of spellcheck attribute?(a) Checks spelling(b) Indicates if spell checking is allowed(c) Checks spelling and corrects it(d) Checks spelling of a given particular text onlyI got this question in exam.Origin of the question is Common HTML5 Attributes Reference in chapter HTML and XHTML Fundamentals of HTML

Answer»

The correct CHOICE is (b) INDICATES if spell CHECKING is allowed

Explanation: SPELLCHECK is a global attribute, it indicates if spell checking is allowed or not for the element. SYNTAX is

 William Shakespeare was a great novelist.

 .

11.

What does wrap attribute denote?(a) Whether the text is in bold(b) Whether the text is wrapped(c) Whether the text is in italics(d) Whether the text is highlightedThe question was asked in an interview for internship.I'd like to ask this question from Common HTML5 Attributes Reference in section HTML and XHTML Fundamentals of HTML

Answer»

Right answer is (b) WHETHER the text is wrapped

To explain I would say: WRAP is the attribute of

12.

Which of the following is not character entity?(a) &aelig(b) &aring(c) &image(d) &ecircThis question was posed to me during an interview for a job.This is a very interesting question from HTML 4.x and XHTML 1.x Character Entities topic in portion HTML and XHTML Fundamentals of HTML

Answer»

Correct CHOICE is (c) &image

The best explanation: &image is used for imaginary part. &aelig, &aring, &ECIRC are all PUNCTUATION character. We REPRESENTS &aelig by the NUMBER æ, &aring by å, &image is by ℑ, &ecirc by ê.

13.

Which entity is not for both HTML and XML?(a) apos(b) It?(c) cent(d) quotThe question was asked in an interview.My enquiry is from HTML 4.x and XHTML 1.x Character Entities in portion HTML and XHTML Fundamentals of HTML

Answer»

Correct choice is (C) cent

Explanation: cent is only HTML CHARACTER ENTITY. Other entities like quot, lt, gt, apos, amp are for the USE of both HTML and XML. The Unicode point in Hex for apos is U+0027, for lt is U+003C, for cent is U+00A2, for quot is U+0022.

14.

The __________ attribute sets the text direction as related to the lang attribute.(a) lang(b) sub(c) dir(d) dsThe question was posed to me in semester exam.My question is from HTML and XHTML Element Reference in portion HTML and XHTML Fundamentals of HTML

Answer»

Right choice is (c) dir

Easiest explanation: The dir attribute specifies the text direction of the element’s content. List of DIRECTORY files is GIVEN by dir tag which is not supported in HTML5. The language of an element’s content is given by lang attribute. The SUBSCRIPT text is defined by SUB attribute.

15.

Use of checked attribute is ____________(a) Whether on page load element should be checked(b) Whether on page load all form element should be checked(c) Whether on page load all list element should be checked(d) Whether on page load all multimedia elements should be checkedI got this question in homework.My doubt is from Common HTML5 Attributes Reference topic in chapter HTML and XHTML Fundamentals of HTML

Answer»

Right option is (a) Whether on PAGE load ELEMENT should be checked

The EXPLANATION is: checked is use with , elements and it indicates if element is checked on LOADING of the page or not.

16.

cols attribute is use with ___________(a) (b) (c) (d) This question was addressed to me during an online exam.Query is from Common HTML5 Attributes Reference topic in portion HTML and XHTML Fundamentals of HTML

Answer»

Right answer is (c)

17.

Which of the following is the attribute that indicates the name of the data source object that supplies the data that is bound to this element?(a) dataFormatAs(b) datafld(c) disabled(d) datasrcThe question was posed to me in an online interview.I would like to ask this question from HTML and XHTML Element Reference in portion HTML and XHTML Fundamentals of HTML

Answer»

The correct option is (d) DATASRC

To explain I would say: The identifier for DATA source is set by dataSrc. When the dataSrc property is applied to a tabular data consumer, the entire data set is REPEATED by the CONSUMING elements. DataFormatAs specifies how data is RENDERED. A Disabled is a boolean attribute which specifies that element should be disabled.

18.

Which entity is for the arrow?(a) &crarr(b) &zeta(c) &upsih(d) &oeligThis question was posed to me during an interview for a job.My doubt is from HTML 4.x and XHTML 1.x Character Entities in portion HTML and XHTML Fundamentals of HTML

Answer»

Correct option is (a) &crarr

The best explanation: &crarr represents a DOWNWARDS ARROW with corner LEFTWARDS. &zeta is for greek small letter zeta, &upsih is for greek upsilon, &oelig is for latin small letter o. Number for &crarr is ↵, for &zeta is ζ, for &upsih is ϒ, for &oelig is 339.

19.

Which of the following is the attribute that is used to add a name/value pair to a microdata item?(a) itemscope(b) itemref(c) itemprop(d) itemidThe question was posed to me during an online interview.Enquiry is from HTML and XHTML Element Reference topic in division HTML and XHTML Fundamentals of HTML

Answer»

Right choice is (C) itemprop

Explanation: A BOOLEAN GLOBAL attribute which specifies SCOPE of associated metadata is itemscope. Itemmid is unique global identifier of item. To add a property to an item, the itemprop attribute is used on one of the item’s descendants. Markup without the microdata-related attributes does not have any effect on the microdata model. Itemref provides list of elements id’s with extra/additional PROPERTIES in the document.

20.

With which element width attribute is not define?(a) (b) (c) (d) This question was addressed to me by my college professor while I was bunking the class.Question is from Common HTML5 Attributes Reference topic in section HTML and XHTML Fundamentals of HTML

Answer»

Correct OPTION is (d)

21.

Which of the following defines a default value on page load?(a) (b) (c) (d) I got this question in an interview.The question is from Common HTML5 Attributes Reference topic in chapter HTML and XHTML Fundamentals of HTML

Answer»

The correct choice is (c)

To explain I would say:

22.

For trade mark sign which entity is used?(a) &shy(b) &trade(c) &sect(d) &realThis question was posed to me at a job interview.I'm obligated to ask this question of HTML 4.x and XHTML 1.x Character Entities topic in chapter HTML and XHTML Fundamentals of HTML

Answer»

The correct choice is (b) &trade

For explanation: We used &trade for the trademark sign, &shy is used for soft HYPHEN, &sect for section sign, &real for real PART SYMBOL. In number &shy is denoted by ­, &trade by ™, &sect by §, &real by ℜ.

23.

The _____________ attribute specifies an inline style associated with an element, which determines the rendering of the affected element.(a) dir(b) style(c) class(d) articleThis question was addressed to me in a national level competition.Asked question is from HTML and XHTML Element Reference in section HTML and XHTML Fundamentals of HTML

Answer»

Correct CHOICE is (b) style

To elaborate: Style attribute SPECIFIES an inline style for an element. The style attribute will override any style SET globally, e.g. styles specified in the style tag or in an external style SHEET. A self-contained content is called attribute. Class is a name given to HTML elements which can be used by CSS and JavaScript for STYLING the web pages. List of directory files is given by dir tag which is not supported in HTML5.

24.

How title attribute works?(a) Displays text when hovering over the element(b) Focus text when hovering over the element(c) Highlight text when hovering over the element(d) Zoom in and zoom out text when hovering over the elementI have been asked this question in semester exam.My query is from Common HTML5 Attributes Reference topic in division HTML and XHTML Fundamentals of HTML

Answer» CORRECT option is (a) DISPLAYS TEXT when hovering over the element

The explanation: the TITLE is a global ATTRIBUTE that displays text in a tooltip when hovered over the element. Syntax is:
25.

How does download attribute work?(a) An indication that hyperlink is to be used for downloading(b) Directly downloads as per the need of the user(c) Gives various source links to download(d) List the topics which one can download from a certain pageThis question was addressed to me in an online quiz.My enquiry is from Common HTML5 Attributes Reference topic in division HTML and XHTML Fundamentals of HTML

Answer»

Correct choice is (a) An INDICATION that HYPERLINK is to be USED for downloading

To elaborate: Explanation: Download attribute BASICALLY use by and elements. It shows the hyperlink is to be used to download a resource when user clicks on it.

26.

For upward double arrow which entity is used?(a) &uArr(b) &uarr(c) &rarr(d) &darrThis question was addressed to me during an online exam.My enquiry is from HTML 4.x and XHTML 1.x Character Entities topic in division HTML and XHTML Fundamentals of HTML

Answer» RIGHT answer is (a) &uArr

The EXPLANATION: &uArr is used for an UPWARDS double arrow, &uarr is for upwards arrow, &rarr for RIGHTWARDS arrow, &darr for downwards arrow.
27.

Which of the following is the attribute that specifies additional horizontal space, in pixels, to be reserved on either side of an embedded item like an iframe, applet, image, and so on?(a) height(b) hspace(c) hidefocus(d) datasrcThe question was asked during an interview.This key question is from HTML and XHTML Element Reference in portion HTML and XHTML Fundamentals of HTML

Answer»

Right choice is (B) hspace

The best I can explain: Height of element is pixels is specified by height ATTRIBUTE. The hspace attribute specifies the whitespace on left and right side of an OBJECT. The hidefocus specifies whether a focused rectangle is drawn around an object. The IDENTIFIER for data source is SET by dataSrc.

28.

Which entity is not for punctuation character?(a) &quot(b) &para(c) &not(d) &acuteI got this question by my school teacher while I was bunking the class.This interesting question is from HTML 4.x and XHTML 1.x Character Entities in portion HTML and XHTML Fundamentals of HTML

Answer»

The correct choice is (d) &ACUTE

The BEST I can explain: &acute is character entity and denote small a of latin language. &quot, &para, &not are punctuation character entities. Number representation of &quot is ", &para is 182, &not is ¬, &acute is 180.

29.

Which attribute indicates a descending order of displaying a list?(a) reversed(b) forward(c) straight(d) circularI have been asked this question in an interview.My question is based upon Common HTML5 Attributes Reference topic in section HTML and XHTML Fundamentals of HTML

Answer» RIGHT answer is (a) reversed

Explanation: Reverse ATTRIBUTE commonly USE with
    element. It indicates that if the list is to be displayed in descending order instead of ascending order or not. There is no reference for options LIKE forward, straight and CIRCULAR in HTML.
30.

datetime attribute is not related with ______________(a) (b) (c) (d) This question was posed to me in an international level competition.Query is from Common HTML5 Attributes Reference in section HTML and XHTML Fundamentals of HTML

Answer»

The correct choice is (d)



The explanation is: Explanation: datetime SHOWS the date and time related with the ELEMENT. Commonly use with ,
31.

Which of the following is the attribute that specifies the column name from the data source object that supplies the bound data?(a) dataFormatAs(b) datafld(c) disabled(d) datasrcThe question was asked in an online quiz.This intriguing question originated from HTML and XHTML Element Reference in chapter HTML and XHTML Fundamentals of HTML

Answer»

The correct answer is (b) datafld

Best explanation: DataFormatAs SPECIFIES how data is RENDERED. The IDENTIFIER for data source is set by DATASRC. Datafld attribute specifies the column name from the data source object that SUPPLIES the bound data. This attribute is specific to Microsoft’s data binding. A Disabled is a boolean attribute which specifies that element should be disabled.

32.

Which attribute is used to provide an advisory text about an element or its contents?(a) tooltip(b) dir(c) title(d) headI got this question during an interview for a job.The origin of the question is HTML and XHTML Element Reference in chapter HTML and XHTML Fundamentals of HTML

Answer»

Correct answer is (C) title

For explanation: The extra information about an element is specified by title tag. The information is most often shown as a tooltip text when the mouse moves over the element. List of directory files is given by dir tag which is not supported in HTML5. Tooltip or else infotip is a GRAPHICAL user interface of an element. Container of METADATA is CALLED head.

33.

Which entity is not for shape?(a) &harr(b) &clubs(c) &hearts(d) &spadesThis question was addressed to me in examination.The above asked question is from HTML 4.x and XHTML 1.x Character Entities topic in division HTML and XHTML Fundamentals of HTML

Answer»

Right CHOICE is (a) &harr

The best EXPLANATION: &harr is for LEFT right arrow, &clubs for club suit, &HEARTS for heart suit, &spades for spade suit. Number representation of &harr is ↔, &clubs is ♣, &hearts is ♦, &spades is ♠.

34.

srclang attribute is used with the element ____________(a) (b) (c) (d) The question was posed to me by my school principal while I was bunking the class.This intriguing question originated from Common HTML5 Attributes Reference in division HTML and XHTML Fundamentals of HTML

Answer»

Correct CHOICE is (a)

To elaborate: srclang attribute is used with . It specifies the language of text. E.g , is used with many attributes like ACCEPT, alt, async, autocomplete, AUTOFOCUS, checked, DIRNAME, disabled, FORM, formaction, height, list and many more.

35.

Which attribute is not for overriding the actions?(a) Formaction(b) Style(c) Tabindex(d) SlotThis question was addressed to me in exam.Asked question is from Common HTML5 Attributes Reference topic in portion HTML and XHTML Fundamentals of HTML

Answer»

The CORRECT choice is (d) Slot

To explain: formaction is used for overriding

ACTION, style is a global ATTRIBUTE that overrides previously set styles, tabindex is also a global attribute which overrides default tab order. A slot is a global attribute which assigns a slot in a SHADOW.
36.

The accesskey attribute specifies a keyboard navigation accelerator for the element.(a) True(b) FalseThe question was posed to me in exam.Asked question is from HTML and XHTML Element Reference in portion HTML and XHTML Fundamentals of HTML

Answer»

The CORRECT answer is (a) True

To explain: The accesskey ATTRIBUTE specifies a shortcut key to activate/focus an element. It specifies a KEYBOARD navigation accelerator for the element. We can USE accesskey attribute in forms or links.

37.

loop attribute is not used with _____________(a) (b) (c) (d) This question was posed to me in an interview for job.This key question is from Common HTML5 Attributes Reference topic in chapter HTML and XHTML Fundamentals of HTML

Answer»

Right option is (d)

For explanation: loop attribute is COMMONLY use with

38.

Syntax of entity declaration is ___________(a) (b) (c) (d) The question was asked during an interview.Question is taken from HTML 4.x and XHTML 1.x Character Entities topic in chapter HTML and XHTML Fundamentals of HTML

Answer»

Right answer is (a) <!entity name “value”>

To EXPLAIN: Character entity REFERENCE declaration is done by syntax <!entity name “value”> in HTML and in XML.This syntax is define in Document TYPE DEFINITON(DTD).

39.

The major difference between minlength and min attribute is ______(a) ‘minlength’ is for the minimum number of characters and ‘min’ is for the minimum value(b) ‘minlength’ is for the minimum value and ‘min’ is for the minimum number of characters(c) ‘minlength’ is for multiple values and ‘min’ is for the single value(d) ‘minlength’ is for single value and ‘minlength’ is for multiple valuesThis question was addressed to me in an online quiz.My query is from Common HTML5 Attributes Reference topic in division HTML and XHTML Fundamentals of HTML

Answer»

Correct choice is (a) ‘MINLENGTH’ is for the minimum NUMBER of characters and ‘min’ is for the minimum value

To elaborate: minlength ATTRIBUTE use with ,

40.

Which attribute specifies a unique alphanumeric identifier to be associated with an element?(a) class(b) id(c) article(d) htmlThe question was posed to me in an online interview.This interesting question is from HTML and XHTML Element Reference in portion HTML and XHTML Fundamentals of HTML

Answer»

Right option is (b) ID

Easy explanation: HTML is Hyper Text Markup Language which is used to create WEB pages and applications. The id attribute is most used to point to a style in a style sheet, and by JavaScript (via the HTML DOM) to manipulate the element with the SPECIFIC id. CLASS is a name given to HTML elements which can be used by CSS and JavaScript for styling the web pages. A self-contained content is called attribute.