ad

Sunday, February 9, 2025

Top 10 html MCQ with Answers

Top 10 html MCQ with Answers

Top 10 HTML  MCQ With Answers 

Top 10 html MCQ with Answers


1]  CSS  full form?

  1.  color and style sheets
  2. Cascade style sheets
  3. Cascading style sheets
  4. None of the above

Answer: 3) Cascading style sheets

2] Which of the following is the correct syntax for external style sheet?

  1. <style src="example.css>
  2. <style src= example.css>
  3. <stylesheet> example.css </stylesheet>
  4. <link rel="stylesheet" type="text/css" href="main.css">

Answer: 4) <link rel="stylesheet" type="text/css" href="main.css"

3] The property in CSS use to change the background color of element ?

  1. bgcolor
  2. background-color
  3. color
  4. All of the above

Answer: (c) background-color

4] The property in CSS use to change the text color of  element

  1. bgcolor
  2. background-color
  3. color
  4. All of the above

 Answer: 3) color

5) The CSS property use to control the element font-size

  1. text-size
  2. text-style
  3. font-size
  4. None of the above

Answer: 3 ) font-size

6] The HTML attribute use to define the inline styles

  1. styles
  2. style
  3. class
  4. None of the above

Answer: 2) style

7]  The HTML attribute use to define the internal stylesheet

  1. <style>
  2. style
  3. <link>
  4. <script>

Answer: (a) <style>

8] Which of the following CSS property is use to set the background image of element?

  1. background-attachment
  2. background- color
  3. background-image
  4. None of the above

Answer: 3) background-image

9] How to create an unordered list in HTML?

  1. <ul>
  2. <li>
  3. <ol>
  4. <i>

Answer: 1) <ul>

10]  Which character is use to represent the closing of a tag  HTML?

  1. \
  2. !
  3. /
  4. \\

Answer: 3) /


Related Post :-

how to create login form

php program to print hear star pattern

css border property

Saturday, February 8, 2025

Top 15 html MCQ with Answers

Top 15 HTML  MCQ With Answers 





1] What is the purpose of the <a> 

A)  To insert images
B) To define a paragraph
C) To create a hyperlink
D) To create headings

Answer: C) To create a hyperlink

 2] <a> tag specifies URL of the link destination

A) link
B)  src
C)  url
D) href

Answer: D) href

3] Which of the  NOT a valid target value for the <a> tag 

A) _parent
B) _top
C) _newtab
D) _self

Answer: C) _newtab

4] Which tag is commonly used with <a>  tag to define navigation link?

A) <nav>
B) <section>
C) <header>
D) <footer>

Answer: A) <nav>

5] What attribute is used to group radio buttons 

A) value
B) group
C) name
D) id

Answer: C) name

6] How can you hide a radio button but functional?

A) display: none;
B) visibility: hidden;
C) opacity: 0;
D) Both A and C

Answer: D) Both A and C

7]  HTML element for creating a dropdown list?

A) <dropdown>
B)  <option>
C)<select> 
D) <list>

Answer: C) <select>

8] Which tag is usedto define individual items inside a dropdown 

A) <list>
B) <option>
C) <dropdown-item>
D) <item>

Answer: B) <option>

9] Which attribute defines the default value submitted with a dropdown LIST ?

A) value
B) default
C) selected
D) name

Answer: A) value

10] assign a name to a dropdown in a form?

A) Use id="dropdown"
B) Use name="dropdown"
C) Use label="dropdown"
D) Use value="dropdown"

Answer: B) Use name="dropdown"

11] How can you group related options in a dropdown 

A) Using <group>
B) Using <fieldset>
C) Using <optgroup>
D) Using <category>

Answer: C) Using <optgroup>

12] How can you create a dropdown with a custom button instead of a <select> ?

A) Using <button> and JavaScript
B) Using <input type="dropdown">
C) Using <menu> and <option>
D) Using <drop-button>

Answer: A) Using <button> and JavaScript

13] How can you prevent use from selecting a particular option  dropdown?

A) Add disabled to the <option>
B) Add hidden to the <option>
C) Add readonly to the <option>
D) Both A and B

Answer: D) Both A and B

14]  HTML tag to create a file upload input?

A) <upload>
B) <file>
C) <input type="file">
D) <input type="upload">

Answer: C) <input type="file">

15] Which attribute is required for selecting multiple files in  upload field?

A) multiple
B) multiselect
C) select="multiple"
D) multi-file

Answer: A) multiple

Related  Post :-

php if else statements

php program to print alphabet pattern U

javascript Tutorial

Friday, February 7, 2025

Top 20 html MCQ with Answers


 

Top 20 HTML  MCQ With Answers 



1] <form> tag  specifies where to send form data

A) action
B) enctype
C)method
D) target

Answer: A) action

2] <form> tag specifies how form data should be sent?

A) enctype
B) method  action
C) method 
D) name

Answer: C) method

3] What are the valid value for the method attribute


A) get, send
B)send, receive
C) get, post
D) send, post 

Answer: C) get, post

3] default method if the method attribute is not specified?

A) POST  DELETE
B) PUT
C) GET
D) POST 

Answer: C) GET

4] Which input type is use for passwords?

A) text
B) password
C) secure
D) pass

Answer: B) password

5] Which element is used to create a dropdown menu in a form?

A) <dropdown>
B) <select>
C) <option>
D) <checkbox>

Answer: B) <select>

6] Which attribute makes an input field required?

A) required
B) mustfill
C) validate
D) mandatory

Answer: A) required

7] What input type allow users to select multiple options?

A) checkbox
B)  button
C) text
D) radio

Answer: A) checkbox

8] What does the name attribute in an input tag 

A) Gives a unique ID
B) Defines a CSS class
C) Identifies the input when sending data
D) Specifies the type of input

Answer: C) Identifies the input when sending data

9] create a multi-line text input field

A) <textarea>
B) <paragraph>
C) <text>
D) <paragraph>

Answer: A) <textarea>

11]  Which tag groups form element together?

A) <group>
B) <fieldset>
C)  <section>
D) <formgroup>

Answer: B) <fieldset>

12] What does the <legend>  

A)   Adds a title to a form
B) Groups options in a dropdown
C) Provides a caption for <fieldset>
D) Defines a label for an input 

Answer: C) Provides a caption for <fieldset>

13] Which tag is use to define a label for an input field

A) <text>
B) <name>
C) <label>
D) <input>

Answer: C) <label>

15] How do you associate a label with an input field

A) Using for attribute in <label>
B) Using id attribute in <input>
C) Both A and B

Answer: C) Both A and B

16] input type restricts users to selecting a date

A) text
B)  datetime
C) calendar
D) date

Answer: B) date

17] Which attribute sets a maximum value for an input field

A) max
B)   value
C) limit
D) maximum

Answer: A) max

 18] input type is used for numeric input

A) number
B) numeric
C) tex
D)  integer

Answer: A) number

 19] What does the <ol> tag stand

A) Ordered Listing

B) Ordered Link

C) Ordered List

D) Online List

Answer: C) Ordered List

20] Which tag is use to define an item inside an ordered list

A) <item>

B) <ol>

C) <li>

D) <ul>

Answer: C) <li>

Wednesday, February 5, 2025

Top 10 HTML MCQ

  

Top 10 HTML  MCQ With Answers 


Top 10 HTML  MCQ With Answers part(10)

1] Where should the <script> tag be placed when linking an                                       external JavaScript file?

A) Inside <head>
B) Inside <body>
C) Before </html>
D) Any of the above

Answer: D) Any of the above


2] How do you correctly link an external JavaScript ?

A) <script src="script.js"></script>
B) <link rel="script" href="script.js">
C) <meta script="script.js">
D) <js src="script.js"></js>

Answer: A) <script src="script.js"></script>


3] Which tag is use to define the favicon for a website?

A) <meta icon>
B) <favicon>
C) <link rel="icon">
D) <icon> 

Answer: C) <link rel="icon">


4] What file types are commonly use for favicons?

A) .png
B) .ico
C) .svg
D) All of the above

Answer: D) All of the above


5] What is the default size of  favicon?

A) 16x16
B) 32x32
C) 64x64
D) 128x128

Answer: A) 16x16


6] Why is the  important<meta charset="UTF-8"> tag ?

A) Ensures proper character encoding
B) Loads stylesheets faster
C) Increases SEO ranking
D) Prevents broken links

Answer: A) Ensures proper character encoding


7] What does the <base> tag do in the <head> tag?

A) Sets the base URL for all relative links
B) Defines the primary content
C) Sets the background color
D) Specifies the document type

Answer: A) Sets the base URL for all relative links


8] What happens if the <title> tag is missing from the <head> tag?

A) The browser shows a blank tab title
B) The file name is displayed as the title
C) The webpage doesn’t load
D) The browser crashes

Answer: B) The file name is displayed as the title

9) How do you make a frame load a default web page?

a) By using the src attribute
b) By using the href attribute
c) By using the load attribute
d) By using the default attribute

Answer: a) By using the src attribute

10] What happens if the cols and rows attributes are not specified in a <frameset>?

a) The browser displays a blank page
b) Frames take up equal space by default
c) Frames do not appear
d) Frames are automatically hidden

Answer: b

Tuesday, February 4, 2025

Top 10HTML MCQ With Answers


Top 10 HTML  MCQ With Answers 

Top 10HTML  MCQ With Answers(part 9)



1] correct html tag to display an image?  

  a) <image>    b) <img>    c) <picture>   d) <src>

Answer : b) <img>

2] <img> tag attribute
   a) src
  b) title
  c) href
  d) a
 Answer a) src 

3]  Syntax for a HTML comment?

  a)  //comment
  b)  /* comment */
  c)  <!-- comment -->
  d) { comment }

Answer c) <!-- comment-->


4]  Correct HTML tah for creating a table?

   a)  <tr>
   b)  <td>
   c)  <th>
   d) <table>

Answer d) <table>

5] what tag use define a row html table?

     a) <tr>
     b) <td>
     c)  <th>
     d) <row>

Answer a) <tr>

6)  what tag use define cell inside table row

    a) <tr>
    b) <row>
    c) <td>
    d) <table>

Answer c) <td>

7] force extra spaces in a paragraph?

 
    a) nbsp;  b) <br>  c) <space>  d) text-space

Answer a) &nbsp;       

 8] add a line break inside a paragraph?

   a) <p>  b) <paragraph>  c) <text>  d)  <para>

Answer a) <p>


9) align  text inside a <p> tag?

   a) text-align in css b) align="center" in html  
  c) Both a & b         d) <p align="middle">

Answer c) both a and b


10) how do you change the text color inside a <p> tag using css?

 a) color   b) text-color  c) style-color  d) font-color

Answer a)color

Related Post :- 

program to print left pascal star pattern in php