Web Technologies MCQs (Set-1)

Difficulty: Easy & Basic

Which language defines the structure and meaning of web page content?

A HTML
B CSS
C JavaScript
D SQL

Why is CSS added to a web page?

A To store records
B To control presentation
C To route packets
D To compile programs

How does JavaScript mainly extend a web page?

A Defines page meaning
B Stores images
C Adds behavior
D Resolves domain names

In browser terminology, what does DOM stand for?

A Style sheet file
B Network address
C Database table
D Document Object Model

Where is an anchor’s destination usually set?

A href attribute
B class attribute
C alt attribute
D title attribute

For the main page heading, which element is appropriate?

A meta element
B link element
C h1 element
D script element

Image alt text provides what for assistive technology?

A Image dimensions
B Text alternative
C File location
D Color profile

When is a button element the right choice?

A For an action
B For a page address
C For a paragraph
D For an image caption

How does a label connect to a form control?

A href attribute
B src attribute
C target attribute
D for attribute

How can a stylesheet target every element with class notice?

A #notice selector
B notice selector
C .notice selector
D *notice selector

On mobile, what does the viewport meta setting help control?

A Audio volume
B Mobile layout width
C Server location
D Text encoding

Which element links an external stylesheet?

A link element
B style element
C meta element
D label element

Why is the lang attribute useful on html?

A Sets page width
B Loads fonts
C Identifies page language
D Encrypts traffic

For email-address input, which type is appropriate?

A search
B number
C hidden
D email

Relative URLs use which starting point?

A DNS root server
B Document base URL
C Browser version
D Screen resolution

During page inspection, which browser panel shows page elements?

A Elements panel
B Downloads panel
C History panel
D Bookmarks panel

By matching device or viewport features, what can media queries target?

A Database records
B URL fragments
C Device or viewport features
D HTTP methods

In JavaScript, which keyword declares a block-scoped constant binding?

A goto
B define
C static
D const

For a match, document.querySelector() returns which element?

A Every matching element
B First matching element
C The page URL
D A stylesheet rule

Why should form controls have associated labels?

A Faster DNS lookup
B Smaller images
C Clear accessible names
D Automatic encryption

Web pages commonly travel between clients and servers using which protocol?

A HTTP
B SMTP
C SSH
D NTP

Domain names are mapped to network addresses by which system?

A CSS
B HTTP
C TLS
D DNS

Which scheme protects HTTP traffic using TLS?

A FTP
B HTTPS
C file
D mailto

Which small piece of site state may a browser cookie store?

A A complete web page
B CSS source code
C Small site state
D DNS zone file

How does HTML denote a paragraph of text?

A nav element
B img element
C aside element
D p element