HTML Questions and Answers - Fundamentals-5

1. Which of the following element is responsible for making the text italic in HTML?
a) <i>
b) <italic>
c) <it>
d) <pre>

Answer: a
Explanation: The <i> (italic tag) tag in HTML is used to display the written text in italic format.

2. For displaying a list horizontally, we can use ______________
a) type
b) display:inline
c) <dt>
d) <dd>

Answer: b
Explanation: If we want to display the list horizontally we can use display:inline or float:left. It will create a menu. E.g. ul {list-style-type: none; padding:0; overflow:hidden; } li {float:left} li g{ display: block; color:red; padding: 20px;}. <dd> element is used to contain definition. <dt> tag is a term in description list.

3. Which attribute is not used on new forms?
a) size
b) text
c) name
d) maxlength

Answer: a
Explanation: size attribute denotes the width of text input i.e measured by the number of characters inputted. E.g., If we input value 3 then it will create a box of width enough to display three characters. The user can enter more characters if they want. Syntax is <input type=”text” name=”firstname” size=”12” maxlength=”30”>

4. Which one of the following is not correct regarding l parameter of hsl in HTML?
a) value of l is used determining the lightness of the color
b) 0% means completely dark and 100% means completely light
c) for getting original color, it should be set to 100%
d) None of the above

Answer: c
Explanation: For getting the original color, it should be set to 50%.

5. Which attribute defines the file-select field?
a) file
b) checkbox
c) button
d) text

Answer: a
Explanation: file input type defines a file-select field, also gives a “Browse” button for file uploads. Syntax is <input type=”file” name=”image” >. Checkbox gives the facility to select one or more than one options from the given choices. The button activates JavaScript code. The text defines a single-line text field.

6. Which object will represent a Marker icon?
a) Marker
b) MarkerShape
c) MarkerImage
d) Markers

Answer: c
Explanation: MarkerImage will represent a structure of a Marker icon or shadow image. The shape of the marker is defined by MarkerShape. Options for rendering the marker are shown by MarkerOptions. Marker object simply creates a Marker.

7. Which will specify placement of controls on map?
a) ControlPosition
b) StreetViewControlOptions
c) ScaleControlStyle
d) ScaleControlOptions

Answer: a
Explanation: ControlPosition specifies placement of controls on map, StreetViewControlOptions provides options for rendering of street view control, ScaleControlStyle specifies kind of scale control to display, ScaleControlOptions lsit down options for rendering sacle control.

8. What is the prefix of all the browser-specific functions?
a) NPP
b) UPP
c) NPN
d) GPN

Answer: c
Explanation: It is a convention that all of the browser specific functions have the prefix ”NPN” and all of the plug-in specific functions have the prefix “NPP”. Gecko calls plug-in API function NP_Initialize at the time when plug-in code first loaded.

9. Which one of the following options is correct?
a) Both block element and inline element start in the new line.
b) Both block element and inline element start in the same line.
c) Only inline element starts in new line.
d) Only block element starts in new line.

Answer: d
Explanation: Block element starts in a new line while inline elements start in the same line.

10. The plug-in DLL can’t contain ______________
a) Language
b) ProductName
c) FileDescription
d) DirectoryName

Answer: d
Explanation: The plug-in DLL should contain FileExtents which specifies file extensions, ProductName which is for plug-in name, Language for the language which is in use, FileDescription for the description, MIMEType for the MIME types, FileOpenName for file open template.