BRAINBUZZ
Play, Learn, Win!
Select the difficulty level :
EASY
MEDIUM
DIFFICULT
hello
Play Again
HOME
1. Which tag is used for the largest heading ?
A) < h6 >
B) < h1 >
C) < h3 >
D) < h5 >
2. What is the correct HTML tag for inserting a line break ?
A) < break >
B) < lb >
C) < br >
D) < b >
3. Which attribute opens a link in a new tab?
A) href = "_blank"
B) target = "_blank"
C) link = "_blank"
D) newtab
4. The < title > tag defines:
A) A paragraph heading
B) Page title in browser tab
C) Website footer
D) Bold text
5. What is the difference between < ul > and < ol >?
A) < ul > → numbered and < ol >→ bulleted
B) < ol > → numbered and < ul >→ bulleted
C) Both are same
D) Both create tables
6. Which tag is used to display tabular data?
A) < div >
B) < table >
C) < section >
D) < grid >
7. Which attribute specifies the source of an image?
A) src
B) img
C) href
D) link
8. Which tag is used to create a checkbox?
A) < checkbox >
B) <input type="check">
C) < input type="checkbox" >
D) < box >
9. Which property changes background color?
A) color
B) bgcolor
C) background-color
D) background-style
10. Which property sets text alignment?
A) text-align
B) align
C) font-align
D) paragraph-align
11. How do you apply a class selector?
A) #classname {}
B) .classname {}
C) classname {}
D) *classname {}
12. Default display type of < div > is:
A) inline
B) block
C) flex
D) none
13. Which property changes font size?
A) text-size
B) font-size
C) size
D) font-style
14. How do you make text bold with CSS?
A) text-weight: bold;
B) font-weight: bold;
C) style: bold;
D) text-bold: true;
15. What is the difference between inline and block elements?
A) Inline starts on new line, block stays within line
B) Block starts on new line, inline stays within line
C) Both are same
D) None of these
16. How do you add a CSS comment?
A) // comment
B) <!-- comment -->
C) /* comment */
D) ## comment
17. Which keyword declares a constant?
A) const
B) var
C) let
D) fixed
18. Output of console.log(5 + "5"):
A) 55
B) 10
C) "10"
D) Error
19. Symbol for single-line comments:
A) //
B) <!--
C) #
D) /* */
20. How to show an alert box?
A) alert("Hello")
B) msg("Hello")
C) popup("Hello")
D) prompt("Hello")
21. What is typeof "Hello"?
A) string
B) text
C) object
D) char
22. Result of true && false:
A) true
B) false
C) undefined
D) null
23. Which function prints in console?
A) log.print()
B) console.log()
C) console.print()
D) alert.log()
24. Output of 2 ** 3:
A) 5
B) 6
C) 8
D) 9
25. Result of 10 % 3:
A) 1
B) 2
C) 3
D) 0
1. Which input type is used for picking a date?
A) < input type="time" >
B) < input type="datetime" >
C) < input type="date" >
D) <input type="calendar">
2. Which tag is used for defining navigation links?
A) < navigate >
B) < nav >
C) < links >
D) <menu>
3. Which attribute provides alternative text for images?
A) src
B) alt
C) href
D) text
4. What does the < thead > tag define inside a table?
A) Table body
B) Table caption
C) Table footer
D) Table heading row
5. Which tag is used to group block-level and inline elements?
A) < section >
B) < article >
C) < div >
D) < span >
6. Which HTML element is used to embed an external webpage?
A) < iframe >
B) < frame >
C) < embed >
D) < object >
7. Which tag is used for marking emphasized text?
A) < b >
B) < strong >
C) < em >
D) < i >
8. Which attribute is used to merge two table cells horizontally?
A) colspan
B) rowspan
C) merge
D) span
9. Which CSS property is used for spacing between elements’ borders?
A) margin
B) padding
C) spacing
D) border-spacing
10. Which property adds space inside an element, between content and border?
A) margin
B) padding
C) spacing
D) align
11. What is the default value of position in CSS?
A) relative
B) static
C) absolute
D) fixed
12. Which property is used to change text decoration (underline, overline)?
A) font-style
B) text-decoration
C) decoration-style
D) text-align
13. Which unit is relative to the root element’s font size?
A) rem
B) em
C) %
D) px
14. Which CSS property controls transparency?
A) opacity
B) visibility
C) filter
D) alpha
15. Which property changes the order of flex items?
A) flex-flow
B) order
C) flex-direction
D) align-items
16. What does overflow: hidden; do?
A) Shows scrollbars
B) Cuts off overflowing content
C) Expands element height
D) Ignores content
17. What is the output of typeof null?
A) "null"
B) "undefined"
C) "object"
D) "none"
18. Which operator checks both value and type equality?
A) =
B) ==
C) ===
D) equals()
19. Which function is used to parse a string into an integer?
A) parseInt()
B) toInteger()
C) Number.int()
D) int()
20. What is the output of:
console.log([1,2,3] + [4,5]);
A) [1,2,3,4,5]
B) "12345"
C) Error
D) [1,2,3][4,5]
21. Which method removes the last element from an array?
A) shift()
B) pop()
C) push()
D) splice()
22. What will Boolean(" ") return?
A) true
B) false
C) null
D) undefined
23. Which method converts JSON string into an object?
A) JSON.stringify()
B) parse.JSON()
C) Object.parse()
D) JSON.parse()
24. Which keyword is used for handling errors?
A) error
B) throw
C) catch
D) trycatch
25. What will be the output?
console.log(0 == false, 0 === false);
A) true true
B) false true
C) true false
D) false false
1. Which attribute is used in <form> to send form data to a server?
A) action
B) method
C) target
D) enctype
2. Which attribute in < form > specifies how form data is sent (GET or POST)?
A) enctype
B) method
C) action
D) type
3. Which element defines self-contained content, like a blog post?
A) <div>
B) <article>
C) <section>
D) <main>
4. Which input type is used to select multiple files at once?
A) <input type="file">
B) <input type="files">
C) <input type="file" multiple>
D) <input type="select">
5. Which tag is used to embed audio in HTML5?
A) <music>
B) <audio>
C) <sound>
D) <media>
6. Which tag is used for scalable vector graphics?
A) <svg>
B) <canvas>
C) <vector>
D) <shape>
7. Which attribute improves accessibility by describing images?
A) alt
B) desc
C) aria-label
D) label
8. Which element specifies preformatted text (preserves spaces & line breaks)?
A) <code>
B) <pre>
C) <samp>
D) <p>
9. What is the difference between relative and absolute positioning?
A) Relative → ignores parent, Absolute → relative to parent
B) Relative → relative to normal position , Absolute → relative to nearest positioned ancestor
C) Both are same
D) None
10. Which property creates a grid layout in CSS?
A) display: grid
B) grid-layout: true
C) flex: grid
D) grid-type
11. Which shorthand sets margin for all four sides?
A) margin: top, bottom, left, right;
B) margin: top right bottom left;
C) margin: all;
D) margin: 4-way;
12. Which CSS property is NOT inherited by default?
A) color
B) font-family
C) border
D) line-height
13. What is the difference between inline-block and inline?
A) Inline has no padding
B) Inline-block starts on a new line
C) Inline-block allows setting width/height , inline does not
D) Both are identical
14. Which pseudo-class selects every 2nd element in a list?
A) li:even
B) li:nth-of-type(2n+1)
C) li:nth-child(2)
D) li:nth-child(2n)
15. Which property makes an element stay fixed when scrolling?
A) position: sticky
B) position: static
C) position: absolute
D) position: scroll
16. What does clip-path in CSS do?
A) Crops an element into a shape
B) Hides overflow content
C) Changes opacity
D) Resizes images
17. What is the value of typeof NaN?
A) NaN
B) number
C) undefined
D) object
18. Which keyword defines a block-scoped variable?
A) var
B) const
C) define
D) let
19. What is the output?
console.log([] == []);
A) true
B) false
C) []
D) Error
20. What is the output?
console.log(typeof function() {});
A) "function"
B) "object"
C) "undefined"
D) "method"
21. Which statement about setTimeout() is true?
A) It runs code immediately
B) It repeats execution
C) It blocks code
D) It delays execution
22. Which method adds elements to the beginning of an array?
A) push()
B) shift()
C) unshift()
D) concat()
23. Which operator is used for optional chaining?
A) ?
B) ?.
C) ??
D) :?
24. What is the output?
console.log(1 < 2 < 3);
A) true
B) false
C) 3
D) Error
25. Which ES6 feature allows unpacking values from arrays/objects?
A) Spread operator
B) Rest parameter
C) Arrow function
D) Template literal