W3Reference.com
Toggle Menu
Home
Online Rust Compiler
Tutorials
Python Tutorial
Java Tutorial
Rust Tutorial
TypeScript Tutorial
ReactJS Tutorial
HTML & CSS Basics
Docker Containers Guide
Kubernetes Tutorial
Software Design Patterns
Blog
All Posts
HTML & CSS Basics
Check your understanding of HTML tags,CSS selectors,and page structure.
1. What does HTML stand for?
Hyperlinks and Text Markup Language
Home Tool Markup Language
Hyper Text Markup Language
2. Which HTML tag is used to define a hyperlink?
<link>
<a>
<href>
<hyperlink>
3. Which CSS property controls the text size?
text-size
font-size
text-style
size
4. What is the correct HTML tag for the largest heading?
<h6>
<heading>
<h1>
<head>
5. Which CSS selector targets an element with id 'header'?
.header
#header
header
*header
6. Which HTML attribute specifies alternate text for an image if it cannot be displayed?
alt
title
src
text
7. In CSS, which 'display' property value makes an element take full width and start on a new line?
inline
block
inline-block
flex
8. Which HTML tag is used to create an unordered list?
<ul>
<ol>
<list>
<li>
9. Select all semantic HTML5 elements from the options below.
<div>
<article>
<section>
<span>
<nav>
10. Which of the following are valid CSS units for specifying font size?
px
em
kg
rem
%
11. Which HTML elements are block-level elements by default?
<span>
<div>
<p>
<img>
<h2>
12. Which of the following are valid CSS 'position' property values?
static
relative
absolute
fixed
float
13. Which HTML elements can include the 'src' attribute?
<img>
<script>
<link>
<a>
<video>
14. HTML is considered a programming language.
True
False
15. The <div> tag is a semantic HTML element.
True
False
16. A CSS class selector can be applied to multiple elements on a single web page.
True
False
17. CSS 'margin' controls spacing inside an element; 'padding' controls spacing outside.
True
False
18. What does CSS stand for? (full name)
19. Name the HTML tag used to define a list item within an ordered or unordered list.
20. What CSS property changes the background color of an element?
Reset
Answered 0 of 0 — 0 correct