Which two are valid attributes for the <meta> tag?
a) name
b) property
c) body
d) footer
e) style
Answers: a) name, b) property
Which two input types are new in HTML5?
a) text
b) number
c) password
d) date
e) textarea
Answers: b) number, d) date
Which two attributes can be used to restrict user input in a number field?
a) min & max
b) start & end
c) low & high
d) minimum & maximum
e) pattern & title
Answers: a) min & max, e) pattern & title
Which two attributes can make an input field non-editable?
a) readonly
b) disabled
c) static
d) constant
e) fixed
Answers: a) readonly, b) disabled
Which two CSS properties directly affect the text within an element?
a) color
b) margin
c) font-size
d) padding
e) border
Answers: a) color, c) font-size
Which two selectors target an element based on its attribute?
a) #header
b) input[type="text"]
c) .intro
d) a:hover
e) img[alt]
Answers: b) input[type="text"], e) img[alt]
Which two properties are used to create space inside an element?
a) margin
b) spacing
c) padding
d) border
e) indent
Answers: c) padding, d) border
Which two values can the position property have?
a) block
b) relative
c) inline
d) fixed
e) float
Answers: b) relative, d) fixed
Which two properties are used to control the layout of elements that wrap around a floated element?
a) clear
b) flow
c) wrap
d) display
e) overflow
Answers: a) clear, e) overflow
Which two values can the display property have?
a) block
b) visible
c) inline
d) hidden
e) show
Answers: a) block, c) inline
Which two tags are required parts of a description list (<dl>)?
a) <dt>
b) <li>
c) <dd>
d) <dl>
e) <ol>
Answers: a) <dt>, c) <dd>
Which two attributes can be used with the <ol> tag?
a) start
b) begin
c) reversed
d) type
e) bullet
Answers: a) start, c) reversed
Which two CSS properties can be used to style list item markers?
a) list-style-type
b) marker-style
c) list-style-image
d) list-bullet
e) list-marker
Answers: a) list-style-type, c) list-style-image
Which two attributes can be used with the <audio> tag?
a) controls
b) looped
c) autoplay
d) muted
e) preload="auto"
Answers: a) controls, c) autoplay
Which two are valid video file formats for the <video> tag?
a) .mp4
b) .avi
c) .mp3
d) .webm
e) .wav
Answers: a) .mp4, d) .webm
Which two attributes define the dimensions of a <video> player?
a) width
b) size
c) height
d) dimensions
e) depth
Answers: a) width, c) height
Which two tags are essential for creating a client-side image map?
a) <img>
b) <map>
c) <area>
d) <link>
e) <div>
Answers: b) <map>, c) <area>
For an <area> tag, which two attributes are mandatory for functionality?
a) shape
b) href
c) coords
d) title
e) alt
Answers: a) shape, c) coords
Which two shapes can be defined using the <area> tag?
a) rect
b) triangle
c) circle
d) oval
e) poly
Answers: a) rect, c) circle
Which two attributes are commonly used with the <iframe> tag?
a) src
b) link
c) width
d) height
e) style
Answers: a) src, c) width
Which two are advantages of using External CSS?
a) Styles are saved in a separate file.
b) It has the highest specificity.
c) It can control the layout of multiple web pages.
d) It is written inside the HTML element.
e) It's easier to maintain and change the style.
Answers: a) Styles are saved in a separate file, c) It can control the layout of multiple web pages
Which two properties are part of the CSS Box Model?
a) margin
b) shadow
c) padding
d) transform
e) content
Answers: a) margin, c) padding
Which two properties can be used to center a block-level element horizontally?
a) margin: auto;
b) text-align: center; (on the parent)
c) align: center;
d) position: center;
e) center: true;
Answers: a) margin: auto;, b) text-align: center; (on the parent)
Which two properties are used to style fonts?
a) font-family
b) font-style
c) text-family
d) text-style
e) style
Answers: a) font-family, b) font-style
Which two values can the font-weight property have?
a) bold
b) italic
c) 700
d) underline
e) large
Answers: a) bold, c) 700
Which two properties can be used to align text?
a) text-align
b) align-text
c) vertical-align
d) text-vertical
e) text-position
Answers: a) text-align, c) vertical-align
Which two properties can add decorative lines to text?
a) text-decoration
b) text-line
c) text-style
d) text-outline
e) text-stroke
Answers: a) text-decoration, d) text-outline
Which two are valid values for the text-align property?
a) left
b) middle
c) center
d) justify
e) top
Answers: a) left, c) center
Which two properties control the spacing of text content?
a) letter-spacing
b) text-spacing
c) word-spacing
d) line-spacing
e) paragraph-spacing
Answers: a) letter-spacing, c) word-spacing
Which two properties can create a visual transition effect?
a) transition
b) animation
c) transform
d) translate
e) effect
Answers: a) transition, b) animation
Which two pseudo-classes are used to style links?
a) :link
b) :clicked
c) :visited
d) :selected
e) :hover
Answers: a) :link, c) :visited
Which two properties can change the cursor when hovering over an element?
a) cursor
b) pointer
c) mouse
d) hover-cursor
e) mouse-pointer
Answers: a) cursor, b) pointer
Which two properties are used to create a flexbox layout?
a) display: flex; (on the parent)
b) flex: 1; (on the child)
c) layout: flex;
d) flex-display: true;
e) flex-align: center;
Answers: a) display: flex; (on the parent), b) flex: 1; (on the child)
Which two properties can make an element transparent?
a) opacity: 0.5;
b) transparent: 50%;
c) visibility: transparent;
d) rgba(255, 0, 0, 0.5) (for color)
e) filter: blur(5px);
Answers: a) opacity: 0.5;, d) rgba(255, 0, 0, 0.5) (for color)
Which two properties add shadow effects?
a) text-shadow
b) font-shadow
c) box-shadow
d) element-shadow
e) drop-shadow
Answers: a) text-shadow, c) box-shadow
Which two values can the overflow property have to handle overflowing content?
a) hidden
b) scroll
c) visible
d) auto
e) break
Answers: a) hidden, b) scroll
Which two properties are used to size elements responsively?
a) width: 100%;
b) max-width: 1200px;
c) size: responsive;
d) responsive: true;
e) min-height: 200px;
Answers: a) width: 100%;, b) max-width: 1200px;
Which two units are relative units in CSS?
a) px
b) em
c) cm
d) rem
e) pt
Answers: b) em, d) rem
Which two media features are used in media queries for responsive design?
a) max-width
b) device-width
c) screen-size
d) min-resolution
e) color
Answers: a) max-width, b) device-width
Which two properties control the order and flexibility of items in a flex container?
a) order
b) flex-grow
c) item-order
d) flexibility
e) grow
Answers: a) order, b) flex-grow
Which two properties are used for 2D/3D transformations?
a) transform: rotate(45deg);
b) rotate: 45deg;
c) transform: translateX(50px);
d) move: 50px;
e) skew: 10deg;
Answers: a) transform: rotate(45deg);, c) transform: translateX(50px);
Which two selectors have higher specificity than a class selector?
a) Inline styles
b) ID selectors (#id)
c) Element selectors (p)
d) Universal selector (*)
e) Pseudo-classes (:hover)
Answers: a) Inline styles, b) ID selectors (#id)
Which two properties can be used to create a gradient background?
a) background: linear-gradient(red, blue);
b) gradient: linear(red, blue);
c) background-image: radial-gradient(red, blue);
d) image: gradient(red, blue);
e) bg-gradient: linear(red, blue);
Answers: a) background: linear-gradient(red, blue);, c) background-image: radial-gradient(red, blue);
Which two properties are used to create a multi-column layout (like in newspapers)?
a) column-count
b) column-gap
c) multi-column
d) text-columns
e) layout: columns;
Answers: a) column-count, b) column-gap
Which two pseudo-elements are used to style specific parts of an element?
a) ::before
b) ::first-letter
c) :first-line
d) :after-element
e) ::part
Answers: a) ::before, b) ::first-letter
Which two values for the background-size property are commonly used?
a) cover
b) fill
c) contain
d) auto
e) stretch
Answers: a) cover, c) contain
Which two properties control the behavior of a grid layout?
a) display: grid; (on the parent)
b) grid-template-columns (on the parent)
c) layout: grid;
d) grid-cell (on the child)
e) grid-area
Answers: a) display: grid; (on the parent), b) grid-template-columns (on the parent)
Which two properties can be animated using CSS transitions?
a) color
b) opacity
c) display
d) height
e) font-family
Answers: a) color, b) opacity
Which two are valid ways to include comments in CSS?
a) // This is a comment
b) /* This is a comment */
c) <!-- This is a comment -->
d) ** This is a comment **
e) # This is a comment
Answers: b) / This is a comment /, c) <!-- This is a comment -->
Which two HTML5 semantic tags are used for navigation and supplementary content?
a) <nav>
b) <aside>
c) <div>
d) <span>
e) <header>
Answers: a) <nav>, b) <aside>