Question Bank Answers

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Explain div element in HTML?

 The <div> tag is easily styled by using the class or id attribute.


 The div tag is known as Division tag
 line break is necessary before and after the <div> element.
 The <div> tag is used as a container for HTML elements
 It is used to group various tags of HTML

 Div tag is Block level tag


 It is a generic container tag

Example : -

<!DOCTYPE html>
<html>
<head>
<title>
Welcome
</title>

<style>
.container{
background-color: blue;
padding: 20px;
}

.container h1{
color: red;
}

</style>
</head>
<body>
<div class="container">
<h1> Archis </h1>
<a href="#"> This is a div tag </a>
</div>
</body>
</html>
What is the marquee element in HTML explained
with an example?

 The <marquee> tag in HTML is used to create scrolling text or


image in a webpages
 The marquee element comes in pairs. It means that the tag has
opening and closing elements.

Example –

<!DOCTYPE html>
<html>

<head>

<title>Marquee Example</title>

</head>

<body>

<marquee behavior="scroll" direction="left">


Welcome to Our Country
</marquee>

</body>
</html>

You might also like