0% found this document useful (0 votes)
3 views4 pages

HTML & Css Test

Uploaded by

gyanchod23
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views4 pages

HTML & Css Test

Uploaded by

gyanchod23
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

HTML Questions (15)

1.What does HTML stand for?

A. Hyperlinks and Text Markup Language

B. Hyper Text Markup Language

C. Home Tool Markup Language

D. None of the above

2.Which tag is used to create a hyperlink in HTML?

A. <link>

B. <a>

C. <href>

D. <hyper>

3.Which tag is used for inserting an image in HTML?

A. <img>

B. <picture>

C. <image>

D. <src>

4.What is the correct HTML tag for the largest heading?

A. <head>

B. <h6>

C. <h1>

D. <heading>
5.Which attribute is used to provide alternative text for an image?

A. title

B. alt

C. src

D. Description

6.True or False: HTML is case sensitive.

7.Write the correct HTML structure with html, head, and body tags.

8.What is the purpose of the <form> tag in HTML?

9.How can you open a link in a new tab using HTML?

A. target="_self"

B. target="_parent"

C. target="_blank"

D. target="new"

10.Which tag is used to define a table row in HTML?

A. <tr>

B. <td>

C. <row>

D. <th>

11.What does the <br> tag do in HTML?

12.Write a simple form in HTML with input fields for name and email.

13.What’s the difference between <ul> and <ol>?

14.Which tag is used to embed a video in HTML5?

15.How do you add a comment in HTML?


CSS Questions (15)

1.What does CSS stand for?

A. Creative Style Sheets

B. Cascading Style Sheets

C. Computer Style Sheets

D. Colorful Style Sheets

2.Which property is used to change the background color?

A. color

B. bgcolor

C. background-color

D. background

3.How do you apply styles to all <p> elements in a page?

A. #p {}

B. .p {}

C. p {}

D. *p {}

4.What is the default position of HTML elements?

A. Relative

B. Absolute

C. Static

D. Fixed

5.Which CSS property is used to center text horizontally?

6.Write the syntax to link a CSS file in HTML.

7.What is the difference between id and class in CSS?

8.True or False: Inline CSS overrides external and internal styles.


9.Which symbol is used to select a class in CSS?

A. #

B. .

C. @

D. $

10.What is the output of the following CSS rule?

div {

display: flex;

justify-content: center;

align-items: center;

A. Aligns text to left

B. Centers content both vertically and horizontally

C. Makes div invisible

D. Creates a grid layout

11.What is the box model in CSS? List its components.

12.How do you make a div 100% wide and 100px tall with a red border?

13Create four <div> elements inside a container and align them in a single line.
Each <div> should have a height of 200px and a width of 200px. Also, add
content inside each <div> and align the content to the center of the <div> both
vertically and horizontally.

14.Which property controls the space between lines of text?

A. word-spacing

B. line-height

C. letter-spacing

D. text-indent

15.Write a CSS rule to make all <h1> elements blue and center-aligned.

You might also like