MCQ on HTML Programming Basics | NIELIT ECC

Advertisement

Q51. What is the default font size in HTML if no CSS is applied?
a) 16px
b) 12px
c) 14px
d) 18px

Show Answer

Correct Answer: a) 16px
Explanation: The default font size in HTML is typically 16px for most browsers if no CSS is applied. This value can be adjusted using CSS.

Q52. Which HTML tag is used to create a form input field?
a) <input>
b) <field>
c) <text>
d) <form>

Show Answer

Correct Answer: a) <input>
Explanation: The <input> tag is used to create various types of input fields in a form, including text, password, radio buttons, checkboxes, and more.

Q53. How do you center-align text in HTML using CSS?
a) text-align: center;
b) align: center;
c) center: text;
d) text-center: true;

Show Answer

Correct Answer: a) text-align: center;
Explanation: To center-align text using CSS, you use the text-align: center; property. This aligns the text horizontally within its containing element.

Q54. What is the purpose of the <title> tag in an HTML document?
a) To specify the document’s title in the browser’s title bar or tab
b) To define the main content of the page
c) To create a hyperlink
d) To style the document

Show Answer

Correct Answer: a) To specify the document’s title in the browser’s title bar or tab
Explanation: The <title> tag is used to specify the title of an HTML document. This title is displayed in the browser’s title bar or tab.

Q55. How do you specify a font family in CSS?
a) font-family: family;
b) text-family: family;
c) font: family;
d) family: font;

Show Answer

Correct Answer: a) font-family: family;
Explanation: To specify a font family in CSS, you use the font-family property. This property defines the typeface for the text in an element.

Q56. Which HTML tag is used to group multiple form controls within a form?
a) <form>
b) <fieldset>
c) <group>
d) <container>

Show Answer

Correct Answer: b) <fieldset>
Explanation: The <fieldset> tag is used to group multiple form controls within a form. It can be used along with the <legend> tag to provide a caption for the grouped controls.

Q57. How do you create an ordered list in HTML?
a) <list>
b) <ol>
c) <ul>
d) <dl>

Show Answer

Correct Answer: b) <ol>
Explanation: To create an ordered (numbered) list in HTML, use the <ol> tag. The list items are defined with the <li> tag.

Q58. What attribute specifies the form control type in an HTML <input> element?
a) type
b) name
c) value
d) id

Show Answer

Correct Answer: a) type
Explanation: The type attribute specifies the type of form control to be created by the <input> element, such as text, password, radio, checkbox, and more.

Q59. Which tag is used to define the header of a document or section?
a) <head>
b) <header>
c) <h1>
d) <title>

Show Answer

Correct Answer: b) <header>
Explanation: The <header> tag is used to define introductory content or a set of navigational links at the top of a document or section.

Q60. How do you specify a URL link in HTML?
a) <link href=”url”>
b) <a href=”url”>
c) <url link=”url”>
d) <hyperlink href=”url”>

Show Answer

Correct Answer: b) <a href=”url”>
Explanation: To create a URL link in HTML, use the <a> tag with the href attribute to specify the destination URL.

Advertisement
« Prev1 ... 45 6 78 ... 10» Next
error: Content is protected !!
Scroll to Top