CSS MICRO-PROJECT Harshal Ukey
CSS MICRO-PROJECT Harshal Ukey
Submitted- 2023-24
This micro-project work submitted in partial fulfillment of requirements for the award of
diploma in Computer Technology for subject "CSS (Cascading Style Sheets)”.
Computer Engineering
1. 54 Harshal.R.Ukey 2101210133
This is to certify that the following student of this institute have carried out this
microproject in work “Develop a login web page using Day-Night Toggle Effect. “Under
the guidance of Miss.S.K Kharkate Lect. in the Department of Computer Engineering
during the session 2023-2024 This work has been in the partial fulfillment of the award for
Diploma in Computer Engineering from Maharashtra State Board of Technical Education,
Mumbai.
SUBMITTED BY
Sr no.
Roll Name of Student Enrollment no.
no.
1. 8 Harshal.R.Ukey 2101210133
Before diving into the development process, it's essential to understand the key
concepts and elements related to a day-night toggle effect in web design:
• Day Mode and Night Mode: These are two distinct color schemes or themes for
a website. Day mode typically features lighter colors, while night mode uses
darker colors. Users can switch between these modes to suit their preferences
and lighting conditions.
• Toggle Button: A toggle button is a user interface element that allows users to
switch between different states or modes. In this case, it would enable the user
to switch between day and night modes.
• CSS and JavaScript: Cascading Style Sheets (CSS) are used to define the visual
styles of the web page, while JavaScript is used to add interactivity and
functionality to the toggle effect.
5.0 Proposed methodology:
• Algorithm:
• Start
• Create the HTML Structure (index.html):
Sr. Name of
no. resource/materia specification Quantity Purpose
l
1. Internet Gives information As per To get
requirement information- on
and pictures.
2. Laptop ASUS-TUF 1 To make micro
project.
3. Book 1
HTML Markup: You will apply your knowledge of HTML to structure the login page.
This includes defining form elements like input fields and buttons.
CSS Styling: You will use CSS to style the page, including defining the look and feel of
the day and night themes. This demonstrates your ability to create visually appealing user
interfaces.
Responsive Design: Ensure that your login page is responsive, adapting to different
screen sizes and orientations, showcasing your understanding of responsive design
principles.
4.0 Actual Methodology followed:
● Search for topic suitable to Microprocessor microproject.
● Select topic which address over course outcome.
Selected topic discussed with project guide Prof. Miss.S.K Kharkate
1. HTML Structure:
- Create an HTML file with the necessary structure for the login page.
- Include elements for the login form, username and password inputs, and the
toggle switch for day and night modes.
2. CSS Styling:
- Define CSS styles for the login form, background, and other page elements.
- Create separate CSS classes for the light and dark themes.
- Initially, set the default theme (e.g., light) as the active theme.
3. JavaScript for Toggle:
- Create functions to switch between light and dark themes when the toggle switch
is clicked.
- Use CSS classes to apply the appropriate styles for each theme.
4. Event Listeners:
- Add event listeners to the toggle switch element to trigger the theme change
function.
- Ensure that the page updates in real-time when the user toggles between themes.
5.Responsive Design:
- Implement responsive design principles to ensure the page looks good on various
screen sizes and devices.
6. Accessibility:
- Ensure that the login page is accessible to users with disabilities by following
accessibility best practices.
- Provide alternative text for images and use semantic HTML elements.
7. Testing:
- Test the day-night toggle functionality on various devices and screen sizes.
8. Error Handling:
- Implement error handling for the login form, including validation for empty
fields and incorrect login credentials.
9. Security:
- Implement security measures for handling user credentials, such as using HTTPS and
proper authentication methods.
10. Documentation:
- Create documentation that explains how to use the day-night toggle feature for future
reference and maintenance.
11. Deployment:
- Host the login web page on a web server or a hosting platform of your choice.
- Gather user feedback to continuously improve the user experience and address any
issues or suggestions.
7.0. Reference:-
1. Internet is a best option for information's.
2. We take all information Chat gpt(Open AI Playground)
3. Books:- CSS (Cascading Style Sheets)
8.0.Project Information:- Creating a login web page with a day-night toggle feature
involves HTML, CSS, and possibly some JavaScript. Here's a step-by-step guide with
project information and definitions:
Project Information:
- Project Description: This project involves creating a login web page that offers a
daynight toggle feature, allowing users to switch between light and dark themes.
Project Definitions:
- It provides the structure and content of a web page, including elements like
headings, paragraphs, forms, and links.
- CSS is used to define the style and layout of HTML elements on a web page.
- It allows you to control the visual aspects, such as colors, fonts, margins, and
positioning.
3. JavaScript:
4. Login Page:
- A login page is a web page where users can provide their credentials (username
and password) to access a restricted area or perform certain actions on a website.
5. Day-Night Toggle:
- A day-night toggle is a user interface element that allows users to switch between
light and dark color themes on a web page.
- It typically involves changing the background color, text color, and other style
properties to create a visually distinct theme.
Steps to Develop the Login Web Page with Day-Night Toggle:
- Design the structure of your login page using HTML elements. Include form
fields for username and password.
- Apply CSS styles to create the initial visual design of the login page in the light
theme.
- Create a toggle button that users can click to switch between day and night
themes.
- Use CSS to define styles for both themes (light and dark).
- When the button is clicked, toggle between the light and dark theme by adding or
removing CSS classes.
- Define CSS styles for both the light and dark themes, specifying properties such
as background color, text color, and font styles.
- Use JavaScript to store the user's theme preference (day or night) in a cookie or
local storage.
- Apply the selected theme when the user visits the login page in the future.
7. Validate User Input (Optional):
- Thoroughly test the login page in both light and dark themes to ensure
functionality and appearance.
- Host the login page on a web server or a web hosting platform to make it
accessible to users.
CODE:-
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Login Page</title>
<style>
body {
.container { max-
background-color: #ffffff;
border-radius: 5px;
h2 {
text-align: center;
} label {
display: block;
margin-bottom: 10px;
input[type="text"], input[type="password"] {
.toggle-label { display:
between;
weight: bold;
.toggle-switch {
display: inline-block;
radius: 25px;
position: relative;
cursor: pointer;
.toggle-slider {
25px; background-color:
#ffffff; border-radius:
top: 0; left: 0;
mode {
</style>
</head>
<body>
<div class="container">
<h2>Login</h2>
<form id="login-form">
<label for="username">Username</label>
<input type="text" id="username" name="username" required>
<label for="password">Password</label>
<div class="toggle-label">
<span>Day Mode</span>
<label class="toggle-switch">
<span class="toggle-slider"></span>
</label>
<span>Night Mode</span>
</div>
<button type="submit">Login</button>
</form>
</div>
<script>
toggleMode.addEventListener('change', function() { if
(this.checked) {
body.classList.add('night-mode');
} else {
body.classList.remove('night-mode');
}
});
</script>
</body>
</html>
OUTPUT:-
9.0. Conclusion:-
A project conclusion in the context of developing a login web page with a day-night
toggle should include the following key points:
1. Project Overview: Briefly summarize the project, highlighting its purpose and key
features, such as the login form and the day-night toggle.
2. Development Process: Describe the steps taken to create the web page, including
setting up the environment, designing the HTML structure, applying CSS styles, and
implementing JavaScript functionality.
4. Testing: Explain the testing process, including how the web page was tested on
different devices and browsers to ensure compatibility and responsiveness.
5. User Experience: Discuss the user experience considerations, such as the choice of
colors for day and night modes, and how the toggle switch enhances user interaction.
8. Conclusion: Summarize the overall success of the project, whether it met its
objectives, and any key takeaways from the development process.
10. References: Include any references to external libraries or resources used during
development.
11. Source Code: If applicable, provide a link or attachment to the source code for the
web page.