HTML questions

By Interwoven Maths

HTML question collection

Review HTML questions for Computer Science, with correct answers shown and coverage across HTML tags and elements; attributes and links; images and lists.

Back to HTML practice Back to Computer Science

Question 1

What does HTML stand for?
  1. HyperText Markup Language
  2. HighText Machine Language
  3. Hyperlink and Text Machine Language
  4. Home Tool Markup Language

Question 2

What does CSS mainly control?
  1. Style and layout
  2. Data storage
  3. Internet speed
  4. Password security

Question 3

In HTML, which tag is used for the largest heading?
  1. <h1>
  2. <p>
  3. <h6>
  4. <head>

Question 4

In HTML, which tag makes a paragraph?
  1. <p>
  2. <h1>
  3. <a>
  4. <br>

Question 5

In HTML, which tag adds an image?
  1. <img>
  2. <pic>
  3. <image>
  4. <src>

Question 6

In HTML, which image attribute gives the file location?
  1. src
  2. href
  3. alt
  4. id

Question 7

Which tag makes a clickable link in page content?
  1. <a>
  2. <link>
  3. <href>
  4. <url>

Question 8

In HTML, which attribute sets a link destination?
  1. href
  2. src
  3. alt
  4. class

Question 9

In HTML, which tag starts a bulleted list?
  1. <ul>
  2. <ol>
  3. <li>
  4. <list>

Question 10

In HTML, which tag makes one list item?
  1. <li>
  2. <item>
  3. <ul>
  4. <p>

Question 11

Which keyword declares a mutable block-scoped variable in JavaScript?
  1. let
  2. var
  3. const
  4. function

Question 12

In JavaScript, which command shows text in the browser console?
  1. console.log()
  2. print()
  3. echo()
  4. input()

Question 13

In JavaScript, which symbol starts a single-line comment?
  1. //
  2. #
  3. /*
  4. --

Question 14

JavaScript mainly adds what to web pages?
  1. Interactivity
  2. Storage
  3. Printing
  4. Compression

Question 15

In JavaScript, which event happens when a button is pressed?
  1. click
  2. load
  3. scroll
  4. resize

Question 16

In HTML, which tag creates a button?
  1. <button>
  2. <btn>
  3. <click>
  4. <press>

Question 17

In JavaScript, which brackets are used to call a function?
  1. ()
  2. []
  3. {}
  4. <>

Question 18

Which operator checks strict equality in JavaScript?
  1. ===
  2. ==
  3. =
  4. !=

Question 19

In JavaScript, what is a loop mainly used for?
  1. Repeating code
  2. Storing files
  3. Drawing images
  4. Connecting devices

Question 20

What is an if statement used for in JavaScript?
  1. Making a decision
  2. Changing font size
  3. Saving a web page
  4. Uploading a file

Question 21

Which tag starts an ordered list?
  1. <ol>
  2. <ul>
  3. <li>
  4. <list>

Question 22

What does the alt attribute provide for an image?
  1. Alternative text
  2. Image file type
  3. Image width in pixels
  4. Link destination

About this topic

Review HTML questions for Computer Science, with correct answers shown and coverage across HTML tags and elements; attributes and links; images and lists.

This topic covers

Example question types