wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Internet and Web Programming

Total questions: 117

Worksheet time: 59mins

Name
Class
Date
1.
Which HTML tag is used to link an external stylesheet?
a)
<link>
b)
<style>
c)
<css>
d)
<stylesheet>
2.
Which CSS property changes the stacking order of positioned elements?
a)
z-index
b)
order
c)
stack
d)
layer
3.
Which JavaScript method converts a JSON string to a JavaScript object?
a)
JSON.parse()
b)
JSON.stringify()
c)
JSON.decode()
d)
JSON.object()
4.
Which HTTP status code indicates a resource has been permanently moved to a new URL?
a)
301
b)
302
c)
200
d)
404
5.
Which HTML attribute is used to make an <input> field mandatory?
a)
required
b)
mandatory
c)
must
d)
validate
6.
Which CSS unit is always relative to the parent element’s font size?
a)
em
b)
rem
c)
vw
d)
px
7.
Which JavaScript event fires when the DOM is fully loaded?
a)
DOMContentLoaded
b)
load
c)
ready
d)
onload
8.
Which HTTP method is idempotent and used for updating resources?
a)
PUT
b)
POST
c)
PATCH
d)
DELETE
9.
Which HTML tag is used to embed client-side scripts?
a)
<script>
b)
<javascript>
c)
<code>
d)
<client>
10.
Which CSS property creates rounded corners?
a)
border-radius
b)
corner-radius
c)
round-border
d)
curve
11.
Which JavaScript operator checks both value and type?
a)
===
b)
==
c)
!=
d)
!==
12.
Which HTML element is used for unordered lists?
a)
<ul>
b)
<ol>
c)
<li>
d)
<list>
13.
Which CSS rule selects every direct child of an element?
a)
element > *
b)
element + *
c)
element ~ *
d)
element *
14.
Which JavaScript function schedules repeated execution every n milliseconds?
a)
setInterval()
b)
setTimeout()
c)
setRepeat()
d)
setEach()
15.
Which HTTP header tells the browser to treat a response as JSON?
a)
Content-Type: application/json
b)
Accept: json
c)
Content-Disposition: json
d)
Cache-Control: json
16.
Which HTML meta tag controls viewport scaling on mobile?
a)
<meta name="viewport">
b)
<meta name="device">
c)
<meta name="scale">
d)
<meta name="responsive">
17.
Which CSS property enables flexbox layout on a container?
a)
display: flex
b)
layout: flexbox
c)
flex: true
d)
flexbox: on
18.
Which JavaScript object provides URL utilities in modern browsers?
a)
URL
b)
String
c)
URI
d)
Location
19.
Which HTML attribute stores custom data for JavaScript access?
a)
data-*
b)
custom-
c)
js-
d)
attr-
20.
Which CSS pseudo-class targets the first child of its parent?
a)
first-child
b)
first-of-type
c)
only-child
d)
child-first
21.
Which JavaScript statement is used to fetch remote resources asynchronously?
a)
fetch()
b)
get()
c)
request()
d)
retrieve()
22.
Which HTML semantic tag is used for navigation menus?
a)
<nav>
b)
<menu>
c)
<navigation>
d)
<link>
23.
Which CSS property controls text capitalization?
a)
text-transform
b)
text-case
c)
text-cap
d)
text-style
24.
Which JavaScript method adds an element at the end of an array?
a)
push()
b)
append()
c)
add()
d)
insert()
25.
Which HTTP response header prevents a resource from being cached?
a)
Cache-Control: no-cache
b)
No-Cache: true
c)
Expires: 0
d)
Pragma: no-store
26.
Which HTML tag defines a self-contained article?
a)
<article>
b)
<section>
c)
<div>
d)
<post>
27.
Which CSS value positions an element relative to its normal flow?
a)
position: relative
b)
position: static
c)
position: absolute
d)
position: fixed
28.
Which JavaScript constructor creates a new DOM element?
a)
document.createElement()
b)
new Element()
c)
DOM.create()
d)
create()
29.
Which HTML attribute specifies alternate text for images?
a)
alt
b)
title
c)
desc
d)
caption
30.
Which CSS function defines repeating gradients?
a)
repeating-linear-gradient()
b)
linear-gradient()
c)
repeat-gradient()
d)
gradient-repeat()
31.
Which JavaScript event fires when a form is submitted?
a)
submit
b)
send
c)
post
d)
form-submit
32.
Which HTTP method is used to partially update a resource?
a)
PATCH
b)
PUT
c)
POST
d)
DELETE
33.
Which HTML tag is used to include video without external plugins?
a)
<video>
b)
<media>
c)
<movie>
d)
<embed>
34.
Which CSS property sets the transparency level of an element?
a)
opacity
b)
alpha
c)
transparent
d)
see-through
35.
Which JavaScript method removes whitespace from both ends of a string?
a)
trim()
b)
strip()
c)
clean()
d)
chop()
36.
Which HTML element groups options in a <select> drop-down?
a)
<optgroup>
b)
<group>
c)
<optiongroup>
d)
<choices>
37.
Which CSS rule applies styles only when the screen width is 600 px or less?
a)
@media (max-width: 600px)
b)
@screen (max-width: 600px)
c)
@max-width 600px
d)
@media query 600px
38.
Which JavaScript keyword declares a block-scoped variable?
a)
let
b)
var
c)
const
d)
block
39.
Which HTTP status code signals “Not Found”?
a)
404
b)
200
c)
500
d)
403
40.
Which HTML tag creates a line break without extra space?
a)
<br>
b)
<break>
c)
<newline>
d)
<lb>
41.
Which CSS property sets the space between lines of text?
a)
line-height
b)
text-spacing
c)
line-spacing
d)
height
42.
Which JavaScript method converts an object to a JSON string?
a)
JSON.stringify()
b)
JSON.parse()
c)
JSON.encode()
d)
JSON.toString()
43.
Which HTML attribute preloads an image for faster display?
a)
rel="preload"
b)
preload
c)
prefetch
d)
async
44.
Which CSS selector targets every element with class="btn"?
a)
.btn
b)
#btn
c)
btn
d)
*
45.
Which JavaScript API stores data in the browser beyond page reloads?
a)
localStorage
b)
sessionStorage
c)
cookieStorage
d)
browserDB
46.
Which HTML element represents a clickable button?
a)
<button>
b)
<btn>
c)
<input type="button">
d)
<click>
47.
Which CSS property defines the thickness of text characters?
a)
font-weight
b)
text-weight
c)
boldness
d)
font-thickness
48.
Which JavaScript method removes the last element from an array?
a)
pop()
b)
removeLast()
c)
delete()
d)
shift()
49.
Which HTTP header is used for Cross-Origin Resource Sharing (CORS)?
a)
Access-Control-Allow-Origin
b)
Allow-CORS
c)
CORS-Policy
d)
X-Allow-Cross
50.
Which HTML tag embeds scalable vector graphics directly?
a)
<svg>
b)
<vector>
c)
<canvas>
d)
<img>
51.
Which CSS value hides an element but keeps its space?
a)
visibility: hidden
b)
display: none
c)
opacity: 0
d)
hide: true
52.
Which JavaScript object represents the browser window?
a)
window
b)
document
c)
navigator
d)
screen
53.
Which HTML attribute auto-focuses an input field on page load?
a)
autofocus
b)
focus
c)
auto-focus
d)
selected
54.
Which CSS rule creates a shadow behind text?
a)
text-shadow
b)
box-shadow
c)
shadow
d)
drop-shadow
55.
Which JavaScript method returns the first element matching a CSS selector?
a)
querySelector()
b)
getElementById()
c)
find()
d)
select()
56.
Which HTTP method is safe and idempotent for retrieving data?
a)
GET
b)
POST
c)
PUT
d)
PATCH
57.
Which HTML tag is used for tabular data display?
a)
<table>
b)
<grid>
c)
<spreadsheet>
d)
<tab>
58.
Which CSS property sets the gap between flex items?
a)
gap
b)
flex-gap
c)
space-between
d)
flex-space
59.
Which JavaScript event fires when the window is resized?
a)
resize
b)
re-size
c)
window-resize
d)
size-change
60.
Which HTML meta tag sets the character encoding to UTF-8?
a)
<meta charset="UTF-8">
b)
<meta encoding="UTF-8">
c)
<meta type="UTF-8">
d)
<meta charset=utf8>
61.
Which CSS pseudo-element targets the first letter of a block?
a)
::first-letter
b)
:first-letter
c)
::first-char
d)
:first-char
62.
Which JavaScript method converts a NodeList to a real array?
a)
Array.from()
b)
toArray()
c)
convert()
d)
list()
63.
Which HTTP header sends credentials with cross-origin requests?
a)
Authorization
b)
Access-Control-Allow-Credentials
c)
Cookie
d)
X-Credentials
64.
Which HTML attribute defers script execution until after HTML parsing?
a)
defer
b)
async
c)
delay
d)
postpone
65.
Which CSS unit is relative to the root element’s font size?
a)
rem
b)
em
c)
vw
d)
%
66.
Which JavaScript method adds an event listener to an element?
a)
addEventListener()
b)
on()
c)
listen()
d)
attach()
67.
Which HTML tag is used for inline styling?
a)
<style>
b)
<css>
c)
<inline>
d)
style
68.
Which CSS property sets the mouse cursor icon?
a)
cursor
b)
pointer
c)
mouse-icon
d)
cursor-type
69.
Which JavaScript property retrieves the current page URL?
a)
location.href
b)
window.url
c)
document.url
d)
page.href
70.
Which HTTP response header enforces HTTPS connections?
a)
Strict-Transport-Security
b)
HTTPS-Only
c)
Secure-Connection
d)
Force-HTTPS
71.
Which HTML attribute specifies a placeholder in an input field?
a)
placeholder
b)
hint
c)
watermark
d)
example
72.
Which CSS property creates a grid layout with named areas?
a)
grid-template-areas
b)
grid-areas
c)
areas
d)
named-grid
73.
Which JavaScript method removes an event listener?
a)
removeEventListener()
b)
off()
c)
detach()
d)
unlisten()
74.
Which HTTP status code indicates an internal server error?
a)
500
b)
200
c)
404
d)
403
75.
Which HTML tag is used to group inline elements without styling?
a)
<span>
b)
<div>
c)
<group>
d)
<inline>
76.
Which CSS function applies a blur effect to an element?
a)
blur()
b)
filter: blur()
c)
blur-effect()
d)
blur-value()
77.
Which JavaScript operator checks if a property exists in an object?
a)
in
b)
exists
c)
has
d)
contains
78.
Which HTML attribute sets the maximum file size for uploads?
a)
max
b)
file-max
c)
size-limit
d)
max-size
79.
Which CSS rule applies styles only in print media?
a)
@media print
b)
@print
c)
@media screen
d)
@page-print
80.
Which JavaScript API enables offline web apps via service workers?
a)
Service Worker
b)
Offline API
c)
CacheStorage
d)
AppCache
81.
Which HTML element defines a dropdown selection list?
a)
<select>
b)
<dropdown>
c)
<listbox>
d)
<choices>
82.
Which CSS property sets the animation duration?
a)
animation-duration
b)
duration
c)
anim-time
d)
transition-time
83.
Which JavaScript method returns all elements matching a CSS selector?
a)
querySelectorAll()
b)
getElementsByClassName()
c)
findAll()
d)
selectAll()
84.
Which HTTP header sets the MIME type for a response?
a)
Content-Type
b)
Accept
c)
MIME-Type
d)
Media-Type
85.
Which HTML attribute stops an iframe from loading until visible?
a)
loading="lazy"
b)
lazy
c)
defer
d)
async
86.
Which CSS value positions an element fixed relative to the viewport?
a)
position: fixed
b)
position: absolute
c)
position: relative
d)
position: viewport
87.
Which JavaScript global object provides URL building utilities?
a)
URL
b)
String
c)
Location
d)
URI
88.
Which HTML tag is used for headings with decreasing size from h1 to h6?
a)
<h1> to <h6>
b)
<heading>
c)
<title>
d)
<header>
89.
Which CSS property sets the flex grow factor for an item?
a)
flex-grow
b)
flex
c)
grow
d)
factor
90.
Which JavaScript method converts a string to uppercase?
a)
toUpperCase()
b)
upper()
c)
toUpper()
d)
upperCase()
91.
Which HTTP method is used to delete a resource?
a)
DELETE
b)
REMOVE
c)
TRASH
d)
ERASE
92.
Which HTML attribute controls the playback speed of a video?
a)
playbackRate
b)
speed
c)
video-speed
d)
play-rate
93.
Which CSS property adds space inside an element’s border?
a)
padding
b)
margin
c)
inner-space
d)
inset
94.
Which JavaScript method creates a deep copy of an object?
a)
structuredClone()
b)
clone()
c)
deepCopy()
d)
copy()
95.
Which HTTP header prevents clickjacking attacks?
a)
X-Frame-Options
b)
Content-Security-Policy
c)
X-Click-Protect
d)
Frame-Guard
96.
Which HTML tag embeds another HTML document within the current one?
a)
<iframe>
b)
<embed>
c)
<include>
d)
<inner>
97.
Which CSS pseudo-class targets links that have been visited?
a)
a:visited
b)
a:link
c)
a:hover
d)
a:active
98.
Which JavaScript method returns the current scroll position vertically?
a)
window.pageYOffset
b)
scrollY
c)
scrollTop
d)
pageScroll
99.
Which HTML attribute specifies the language of the document?
a)
lang
b)
language
c)
locale
d)
xml:lang
100.
Which CSS property sets the direction of flex items?
a)
flex-direction
b)
flex-flow
c)
flex-axis
d)
direction
101.
Which JavaScript method removes whitespace from the beginning of a string?
a)
trimStart()
b)
trimLeft()
c)
ltrim()
d)
startTrim()
102.
Which HTTP response header tells the browser to open a file attachment?
a)
Content-Disposition: attachment
b)
Download-Header
c)
File-Transfer
d)
Attachment-Mode
103.
Which HTML tag is used for ordered lists?
a)
<ol>
b)
<ul>
c)
<li>
d)
<order>
104.
Which CSS property sets the space outside an element’s border?
a)
margin
b)
padding
c)
outer-space
d)
outset
105.
Which JavaScript method schedules code to run once after a delay?
a)
setTimeout()
b)
setInterval()
c)
delay()
d)
wait()
106.
Which HTML attribute provides a tooltip on hover?
a)
title
b)
tooltip
c)
hint
d)
alt
107.
Which CSS function creates smooth color transitions?
a)
linear-gradient()
b)
color-transition()
c)
gradient()
d)
smooth()
108.
Which JavaScript method removes the first element from an array?
a)
shift()
b)
pop()
c)
removeFirst()
d)
unshift()
109.
Which HTTP status code means “Unauthorized”?
a)
401
b)
200
c)
404
d)
500
110.
Which HTML tag is used for inline code snippets?
a)
<code>
b)
<pre>
c)
<kbd>
d)
<samp>
111.
Which CSS property sets the maximum width of an element?
a)
max-width
b)
width-limit
c)
max-size
d)
limit-width
112.
Which JavaScript method converts a string to lowercase?
a)
toLowerCase()
b)
lower()
c)
toLower()
d)
lowerCase()
113.
Which HTTP header indicates the server software type?
a)
Server
b)
User-Agent
c)
Host
d)
Referer
114.
Which HTML element is used for multi-line text input?
a)
<textarea>
b)
<input type="text">
c)
<text>
d)
<multiline>
115.
Which CSS property sets the gap between grid rows and columns?
a)
gap
b)
grid-gap
c)
row-gap
d)
column-gap
116.
Which JavaScript method appends a node to the DOM?
a)
appendChild()
b)
addNode()
c)
insertNode()
d)
append()
117.
Which HTTP method is used to create a new resource on the server?
a)
POST
b)
GET
c)
PUT
d)
PATCH