Exp 3
Exp 3
Cascading Style Sheets is a style sheet language used for describing the presentation of a document
written in a markup language such as HTML or XML. CSS is a cornerstone technology of the
World Wide Web, alongside HTML and JavaScript.
Text Properties
Property Description Values
font Sets all the font properties font-style, font-variant, font-weight, font-
in one declaration size/line height, font-family, caption, icon,
menu, message box, small-caption, status-bar,
inherit
font-size Specifies the font size of xx-small, x-small, small, medium, large, x-large,
text xx large, smaller, larger, length, %, inherit
Code:-
Create a webpage using CSS
} }
.container{ .question-btn {
position: relative; font-size: 1.5rem;
background: #fff; background: transparent;
margin-top: 50px; border-color: transparent;
margin-bottom: 30px; cursor: pointer;
border-radius: 10px; }
filter: drop-shadow(0 0 10px rgba(0,0,0,0.5)); .up-icon {
display: none;
}
.accordion{ }
position: relative; .answer {
width: 350px; font-size: 1.2rem;
margin-left: 40px; line-height: 1.8rem;
} display: none;
.title{ }
margin-top: 20px; .show-text .answer {
font-size: 2rem; display: block;
<div class="Question-answer">
<div class="Question">
} <h3 class="title-question">
.show-text .up-icon{ What URLs can be used to access
display: inline; DigiSafe?
</h3>
} <button class="question-btn">
@media screen and (min-width:992px) { <span class="up-icon">
.accordion { <i class="fas fa-chevron-up">
width: 920px;
height: 0; </i>
display: flex; </span>
} <span class="down-icon">
.accordion-img { <i class="fas fa-chevron-down">
position: relative;
width: 420px; </i>
top: 88px; </span>
</button>
} </div>
.question-answer { <div class="answer">
width: 380px; <p>DigiSafe can be accessed at
} https://www.digilocker.gov.in/</p>
</div>
.container-accordion {
margin-top: 85px; </div>
<div class="Question-answer">
} <div class="Question">
.title { <h3 class="title-question">
margin-top: 50px; What security features are
font-size: 1.5rem; implemented in DigiLocker? Is it safe to put my data
on DigiSafe platform? ?
} </h3>
} <button class="question-btn">
</style> <span class="up-icon">
</head> <i class="fas fa-chevron-up">
<body>
<div class="container"> </i>
<h1 class="title"> </span>
Frequently Asked Question <span class="down-icon">
</h1> <i class="fas fa-chevron-down">
<main class="accordion">
<div class="faq-img"> </i>
<img src="images/faq.png"> </span>
</div> </button>
<div class="content-accordion"> </div>
<div class="answer"> </i>
<p>DigiSafe is completely safe and easy </span>
to use.We do care about your privacy and take all </button>
precautionary measures to protect your data</p> </div>
</div> <div class="Question-answer">
<div class="Question-answer"> <div class="Question">
<div class="Question"> <h3 class="title-question">
<h3 class="title-question"> What is an OTP?
<div class="Question-answer">
<div class="Question"> </h3>
<h3 class="title-question"> <button class="question-btn">
How can I sign up for <span class="up-icon">
Digisafe? <i class="fas fa-chevron-up">
</h3>
<button class="question-btn"> </i>
<span class="up-icon"> </span>
<i class="fas fa-chevron- <span class="down-icon">
up"> <i class="fas fa-chevron-down">
</i> </i>
</span> </span>
<span class="down-icon"> </button>
<i class="fas fa-chevron- </div>
down"> </div>
<p>OTP is an one time password which
</i> is generated by digisafe and sent to your registered
</span> mobile number.It is only valid for 10 minutes</p>
</button> </div>
</div> <div class="Question-answer">
<div class="answer"> <div class="Question">
<p>DigiSafe sign in is very easy. <h3 class="title-question">
You have to enter your mobile or aadhar number then <div class="Question-answer">
you will receive OTP via sms followed by setting of <div class="Question">
authentication pin then your digi safe account will be <h3 class="title-question">
created</p> What are issued documents
</div> and what are uploaded documents?
</h3> </h3>
<button class="question-btn"> <button class="question-
<span class="up-icon"> btn">
<i class="fas fa-chevron-up"> <span class="up-icon">
<i class="fas fa-chevron-
</i> up">
</span>
<span class="down-icon"> </i>
<i class="fas fa-chevron-down"> </span>
<span class="down-icon">
<i class="fas fa-chevron- const questions =
down"> document.querySelectorAll('.question-answer');
</i> questions.forEach(function(question) {
</span> const btn = question.querySelector('.question-btn');
</button> btn.addEventListener("click", function() {
</div> questions.forEach(function(item) {
<div class="answer"> if (item !== question) {
<p>Issued documents are E- item.classList.remove("show-text");
documents which is issued electronically by }
government and URI of the document is available in })
digisafe section</p> question.classList.toggle("show-text");
</div> })
</div> })
</div> </script>
</main>
</div> </body>
<script> </html>
OUTPUT
Output:
We understood how to use CSS and implemented it to make a basic working site using
variousdifferent CSS properties.
Marks
Obtained