0% found this document useful (0 votes)
6 views

Mocktestonfrontend

Uploaded by

vishakha kesare
Copyright
© © All Rights Reserved
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Mocktestonfrontend

Uploaded by

vishakha kesare
Copyright
© © All Rights Reserved
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 4

What does HTML stand for?

a) Hyper Text Markup Language

b) Hyperlinks and Text Markup Language

c) Home Tool Markup Language

d) Hyperlink Text Management Language

ans: Hyper Text Markup Language

Explain the difference between <div> and <span> tags in HTML.

Ans- <div> is used to group the elements and create block level elements div tag is used to griped larger
part of elements

span is used to wrap the elements group inline elements

span tag is used to group smaller part of elements

What is the purpose of the alt attribute in an <img> tag?

Ans- alt attribute used in <img> tag for give alternate or additional information of a img if image path is
not working then given alternate information will be load.

Write the HTML code to create an ordered list with three list items, each containing a different color.

Ans- <ol>

<li > Red</li>

<li> orange </li>

<li> Green</li>

</ol>
How do you create a hyperlink that opens in a new tab?

Ans : <a href=”https://google.com” “target = _blank” > Google </a>

CSS Section:

What does CSS stand for?

Ans: CSS stand for cascading style sheet.

Explain the difference between margin and padding in CSS.

Ans: margin is a space around an elements border

Padding is the space between an elements border and the element’s content

What is the purpose of the z-index property in CSS?

Ans: The z-index property in CSS controls the vertical stacking order of elements that overlap on a web
page.

It determines which elements appear on top of others.

Higher z-index values are placed above lower ones.

Works only on positioned elements (elements with position set to relative, absolute, fixed, or sticky).

Write CSS code to make the text inside a <p> element red and bold.

<html>

<head>

<style>

p{
color: red;

font-weight: bold;

</style>

</head>

<body>

<p>This is a paragraph with red and bold text.</p>

</body>

</html>

What is the CSS box model? Explain briefly.

Ans: The CSS box model is a fundamental concept in web design and layout, describing how elements
are structured and how space is allocated around them

It is used for

Box model contains: content , Padding , Border ,Margin

Content : Where the images and content are displayed

JavaScript Section:

What is JavaScript used for in web development?

Ans: Javascrpit used for web development to give functionallity to web pages and to create ineracative
web pages.

Explain the difference between == and === operators in JavaScript.

Ans: == its check the equilty of value with type coresion

=== check the equality of value without type coresion for both value and datatype also it is strict check
create a signup form with javascript validation

wap in javascript to accept a number and print the factorial

Ans:

You might also like