wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

HTML,CSS

Total questions: 50

Worksheet time: 25mins

Name
Class
Date
1.

How is document type initialized in HTML5.?

a)

</DOCTYPE HTML>

b)

</DOCTYPE>

c)

<!DOCTYPE HTML>

d)

</DOCTYPE html>

2.

How many heading tags are there in HTML5?

a)

2

b)

4

c)

6

d)

8

3.

Which of the following attributes is used to add link to any element?

a)

Src

b)

Link

c)

Href

d)

Newref

4.

Which of the following is the correct way of creating an hyperlink in HTML?

a)

<a>www.geeksforgeeks.org <Geeksforgeeks /a>

b)

<a href=“www.geeksforgeeks.org” Geeksforgeeks /a>

c)

<a href= “www.geeksforgeeks.org”>Geeksforgeeks

</a>

d)

<a link=“www.geeksforgeeks.org” Geeksforgeeks> </a>

5.

Which of the following is the correct way to add background color in HTML?

a)

<body color = “green”>

b)

<body bg-color = “green”>

c)

<body style = “background-color=green”>

d)

<body style = “background-color: green;”>

6.

Which among the following is correct HTML code for making a checkbox?

a)

<checkbox>

b)

<input type="checkbox">

c)

<check>

d)

<input type="check">

7.

1) CSS stands for -

a)

Color style sheets

b)

Color and style sheets

c)

Cascading style sheets

d)

None of the above

8.

Which of the following is the correct syntax for referring the external style sheet?

a)

<style src = example.css>

b)

<style src = "example.css" >

c)

<stylesheet> example.css </stylesheet>

d)

<link rel="stylesheet" type="text/css" href="example.css">

9.

The property in CSS used to change the background color of an element

a)

bgcolor

b)

color

c)

background-color

d)

All of the above

10.

Are the negative values allowed in padding property?

a)

Yes

b)

no

c)

May be

11.

12) Which of the following property is used as the shorthand property of margin properties?

a)

margin-left

b)

margin-right

c)

margin

d)

none of the above

12.

Which of the following is the correct syntax to select all paragraph elements in a div element?

a)

div p

b)

p

c)

div#p

d)

div ~ p

13.

The CSS property used to control the element's font-size is -

a)

text-size

b)

font-size

c)

text-style

d)

none of the above

14.

Choose the correct HTML element for the largest heading:

a)

<h6>

b)

<h>

c)

<largest>

d)

none of the above

15.

What is the correct HTML element for inserting new line in the paragraph?

a)

<line>

b)

<break>

c)

<br>

d)

all of the above

16.

What is the correct HTML for adding a background to the page?

a)

<body style='background-color=#000000'>

b)

<body style='background-image=url()'>

c)

<body style='background-color=black'>

d)

all the above

17.

Set the size of the image to 250 pixels wide and 400 pixels tall. (choose two answer)

a)

<img src="apple.jpg" width="250px" height="400px">

b)

<img src="apple.jpg" style=''width:250px ; height:400px">

c)

<img src="apple.jpg" width :"250px" height : "400px">

d)

<img src="apple.jpg" size='250 * 400 px>

18.

Which of these elements are all <table> elements?

a)

<table><tr><td>

b)

<table><td><tr>

c)

<table><tr></tr><td>

d)

<table></table>

19.

Inline elements are normally displayed without starting a new line.

a)

True

b)

False

20.

block elements are normally displayed without starting a new line.

a)

True

b)

False

21.

HTML uses

a)

User defined tags

b)

Pre-specified tags

c)

Fixed tags defined by the language

d)

Tags only for linking

22.

How can you make a list with numbers?

a)

<dl>

b)

<ol>

c)

<list>

d)

<ul>

23.

which  attribute use to define the link address ?

a)

link

b)

href

c)

hrf

d)

herf

24.

Which HTML element defines the head of a document?

a)

title

b)

head

c)

<meta>

d)

<hd>

25.

 The content of the web (such as your pictures, text, links) will show up here. 

a)

Head

b)

body

c)

style

d)

folder

26.

The tag will not show up on your webpage but at the top of a browser. 

a)

title

b)

body

c)

<br>

d)

<table>

27.

Which of the following is a font property?

a)

Color

b)

size

c)

family

d)

all the above

28.

What is the purpose of HTML

a)

the structure of the web page

b)

the style of the page

c)

all dynamic web site

d)

all of the above

29.

Multimedia can be embedded in an HTML document.

a)

True

b)

False

c)

may be

30.

Google Chrome is an example of a what?

a)

website

b)

browser

c)

url

d)

meta

31.

Which language is used to enhance a webpage, e.g. change background colour?

a)

HTML

b)

CSS

c)

JavaScript

d)

SQL

32.

Change the border size of the body or image

a)

border-style

b)

border-width

c)

border-color

d)

width

33.

sets the element to one side of the page

a)

float

b)

height

c)

alignment

d)

position

34.

What does a class do?

a)

adds color to words

b)

adds style to specific elements

c)

adds style to a whole page

d)

adds a lot more work

35.

Select the rule set to make all the text in your web page blue and centered.

a)

p {

color: blue;

}

b)

body {

text-align: left;

color: blue;

}

c)

p {

text-align: center;

color: blue;

}

d)

body {

text-align: center;

color: blue;

}

36.

What will this rule set create?

h1 {

text-decoration: underline overline dotted red;

}

a)

red waves under the heading

b)

red dots over and under the heading

c)

red waves over and under the heading

d)

red dots over the heading

37.

which has the highest priority in this case

<link href='style.css' rel='stylesheet>

<style>

body

{

background:pink;

}

a)

internal style

b)

external style

38.

which has the highest priority in this case

<style>

body

{

background:pink;

}

<link href='style.css' rel='stylesheet>

a)

internal style

b)

external style

39.

Which item refers to the start tag, the end tag and everything in between?

a)

HTML Element

b)

HTML Tag

c)

HTML Attribute

d)

style

40.

Which tag defines the visible content of a web document?

a)

<head>

b)

<meta>

c)

<title>

d)

<body>

41.

_____is a text file that contains CSS formatting instructions to define the font, color and position of elements used on any markup page(s) to which you attach the style sheet.

a)

<DOCTYPE!>

b)

An external CSS file, or style sheet

c)

<main>

d)

HTML

42.

Name an element which doesn't have a closing tag.

a)

<img>

b)

<head>

c)

<body>

d)

<p>

43.

If you want to have more than one property for a CSS selector, what character separates them?

a)

comma

b)

semi-colon

c)

colon

d)

dash

44.

Which is correct CSS syntax? 

a)

{ body; color=black;}

b)

body: color= black

c)

body {color:black;}

d)

(body color is black) 

45.

The code for the comment tag in CSS is

a)

<!-- comment -->

b)

<!-- comment >

c)

/* comment /*

d)

/* comment */

46.

What unit of measurement does CSS use for size?

a)

px

b)

%

c)

em

d)

All work

47.

which has the highest priority

a)

inline style

b)

id in in internal

c)

id in external

d)

selector in external

48.

What symbol should you use to target a class name in css?

a)

.

b)

#

c)

selector

d)

class

49.

choose the correct syntax for all types css

a)

style=background:black;

color:white

b)

style="background:black;

color:white"

c)

style="background:black,

color:white"

d)

<style>

background:black,

color:white

<style>

50.

 

Style tag will come inside head for

a)

inline

b)

internal

c)

extranl

d)

none of them