Web Report Final
Web Report Final
NAME : SINCHANA V
REG NO : 22BKT0029
COURSE TITLE : WEB PROGRAMMING
COURSE CODE : BCSE203E
ABSTRACT:
SIGNIN PAGE:
The provided HTML document is a web page for a mini-project titled "Geometric Shapes -
Area and applications." This project aims to explore various geometric shapes, their areas,
and their applications in real life. Let's break down the abstract into smaller sections:
1. Introduction and Project Title: The project is introduced with a prominent title
"Geometric Shapes - Area and applications." This title immediately communicates
the main focus of the project, which is to delve into the world of geometric shapes
and their practical implications.
2. Header Section: The header section contains the title of the project presented in a
large font size and centered alignment. The background color of the header is a soft
pink (#FFB6C1), which adds a visual appeal and coherence to the design. The color
scheme is consistent throughout the project, enhancing the overall aesthetic.
3. About Section: Following the header, there's an "About" section that provides a brief
overview of the project's objectives. It states that the mini-project aims to explore
various geometric shapes, their areas, and applications in real life. This sets the
context for the reader, informing them about the purpose and scope of the project.
4. Sign-in, Sign-up, and Registration Sections: The web page includes forms for user
authentication, sign-up, and registration. These sections enable users to interact with
the website, allowing them to sign in if they have an existing account, sign up if they
are new users, or register for additional services or features. Each form includes
input fields for relevant information such as email, password, first name, last name,
etc.
5. Form Validation and Error Handling: JavaScript functions are used for form
validation to ensure that the user inputs are correct and meet certain criteria. Error
messages are displayed dynamically to provide feedback to the user in case of
incorrect inputs or validation failures. For example, the email field is validated using a
regular expression pattern, and password length is checked to ensure it is at least 8
characters long.
6. Form Switching Functionality: The web page also features form switching
functionality, allowing users to toggle between different forms (sign-in, sign-up,
registration) using clickable links. This enhances user experience by providing a
seamless navigation experience without the need to reload the page.
7. Footer Section: Finally, the footer section contains copyright information indicating
the year of the project ("2024 Geometric Shapes Mini-Project"). This section serves
as a closure for the web page and provides attribution to the project creators.
Overall, the abstract of the provided HTML document describes a well-designed web page
for a mini-project focused on exploring geometric shapes, their areas, and applications. The
project incorporates user authentication and registration features along with form validation
and error handling mechanisms to ensure a smooth user experience.
HOME PAGE:
The provided HTML document is a comprehensive web page presenting a mini-project titled
"Geometric Shapes - Area and applications." This project aims to explore various geometric
shapes, their areas, and their practical applications in real life. Let's delve into the abstract:
1. Title and Introduction: The title of the project, "Geometric Shapes - Area and
applications," succinctly conveys its focus. The introduction provides a brief overview
of the project's objectives, emphasizing the exploration of geometric shapes and
their relevance in practical scenarios.
2. Header Section: The header features the project title centered within a visually
appealing background color (#FFB6C1), ensuring clarity and readability. The choice of
font color (white) against the background enhances visibility and draws attention to
the title.
3. About Section: Following the header, the "About" section elaborates on the project's
purpose, outlining its scope to encompass the study of various geometric shapes and
their applications in real-world contexts. This section serves as an introduction,
setting the stage for further exploration.
4. Shapes and Areas Section: The core content of the project is presented in the
"Shapes and Areas" section, which provides information on different geometric
shapes along with their respective areas. Each shape is accompanied by a concise
description and an illustrative image, facilitating better understanding for the
audience. The inclusion of formulas for calculating areas enhances educational value.
5. Applications Section: In the "Applications" section, the practical significance of
geometric shapes is highlighted. It discusses how these shapes find relevance across
diverse fields such as architecture, engineering, art, etc. Additionally, clickable links
are provided for each shape, allowing users to explore further details on individual
shapes and their applications.
6. Footer Section: The footer contains copyright information, attributing the project to
the respective creators and indicating the year of publication. This section serves as a
conclusion, providing closure to the web page and acknowledging the intellectual
property rights.
7. Styling and Design: The overall design of the web page is clean and aesthetically
pleasing. Consistent use of colors, font styles, and layout contributes to a cohesive
visual experience. The inclusion of images enhances engagement and
comprehension, making the content more accessible to users.
8. Scripting for Form Switching: JavaScript scripting is utilized to enable form switching
functionality, allowing users to toggle between different sections of the web page
seamlessly. This enhances user experience and navigation, improving overall
usability.
In summary, the abstract of the provided HTML document describes a well-structured and
informative web page dedicated to exploring geometric shapes, their areas, and practical
applications. Through concise explanations, illustrative images, and interactive elements, the
project aims to educate and engage users interested in geometry and its real-world
implications.
Project Structure:
The HTML document follows a structured layout consisting of several sections:
1. Header: The header section prominently displays the project title, "Geometric Shapes -
Area and Applications," setting the context for the entire project.
2. About Section: This section provides a brief overview of the mini-project's purpose,
emphasizing its focus on exploring geometric shapes, their areas, and real-life applications.
3. Sign-in, Sign-up, and Registration Sections: These sections feature interactive forms
allowing users to sign in, sign up for a new account, or register additional information. Each
form is designed to capture specific user data while adhering to validation rules to ensure
data integrity and security.
4. Footer: The footer section contains copyright information and serves as a conclusion to
the project.
Project Structure:
The HTML document follows a structured layout, consisting of several key sections:
1. Header: The header section contains the project title, "Geometric Shapes - Area and
Applications," providing users with a clear indication of the project's focus.
2. About Section: This section offers a brief overview of the mini-project, outlining its
objectives and the topics it covers.
3. Shapes and Areas: In this section, various geometric shapes such as circles, squares,
triangles, rectangles, spheres, cubes, cones, and cuboids are presented along with their
respective formulas for calculating area. Each shape is accompanied by an image to visually
represent its geometry.
4. Applications: The applications section discusses the practical uses of geometric shapes in
different fields and provides links to individual pages for further exploration.
5. Footer: The footer section contains copyright information, providing attribution to the
project creators and establishing ownership.
Conclusion:
In conclusion, the "Geometric Shapes Mini-Project" represents a valuable educational
resource for learning about geometric shapes, their areas, and real-life applications. Through
structured content, visual representations, and interactive elements, the project fosters a
deeper understanding of geometry while highlighting its significance in various professional
fields. Overall, the mini-project serves as an effective tool for promoting mathematical
literacy and encouraging exploration of geometric concepts.
PROBLEM STATEMENT:
The problem statement for the provided HTML code can be outlined as follows:
Background:
Geometry is a fundamental branch of mathematics that deals with shapes, sizes, and
properties of objects in space. Understanding geometric shapes and their applications is
crucial in various fields, including architecture, engineering, and design. However, grasping
these concepts can be challenging without proper educational resources.
Objective:
To develop a comprehensive mini-project that educates users about geometric shapes, their
areas, and real-life applications. The project aims to provide an interactive and engaging
learning experience, catering to users of different ages and backgrounds.
Scope:
The mini-project will cover the following key areas:
1. Presentation of Geometric Shapes: Introduce various geometric shapes, including circles,
squares, triangles, rectangles, spheres, cubes, cones, and cuboids.
2. Calculation of Areas: Present formulas for calculating the area of each geometric shape
and provide examples for better understanding.
3. Real-Life Applications: Discuss practical applications of geometric shapes in fields such as
architecture, engineering, art, and more.
4. Interactive Elements: Include interactive features such as clickable links and forms to
enhance user engagement and facilitate exploration.
Requirements:
1. HTML Document: Develop an HTML document containing structured content, descriptive
text, and visual representations of geometric shapes.
2. CSS Styling: Apply CSS styling to enhance the visual appeal and readability of the
document, ensuring consistency in design elements.
3. JavaScript Functionality: Implement JavaScript functions to enable interactive features
such as form validation and dynamic content display.
4. Educational Content: Provide clear and concise explanations of geometric concepts,
accompanied by illustrative images and real-life examples.
5. User-Friendly Interface: Design the mini-project with a user-friendly interface, allowing
users to navigate easily and access relevant information.
Deliverables:
1. HTML Document: A well-structured HTML document containing all necessary content and
interactive elements.
2. CSS Stylesheet: CSS stylesheet to apply consistent styling and formatting to the HTML
document.
3. JavaScript Code: JavaScript code for implementing interactive features and enhancing user
experience.
4. Documentation: Documentation outlining the project's objectives, scope, requirements,
and implementation details.
Success Criteria:
The success of the mini-project will be evaluated based on the following criteria:
1. Educational Value: The project effectively educates users about geometric shapes and
their applications.
2. User Engagement: The project engages users through interactive elements and clear
presentation of content.
3. Accessibility: The project is accessible to users of different skill levels and backgrounds.
4. Functionality: All interactive features work smoothly, including form validation and
dynamic content display.
5. Visual Appeal: The project is visually appealing and well-designed, enhancing the overall
user experience.
TECHNICAL SPECIFICATION:
Creating a technical specification for the provided HTML code involves detailing its structure,
functionality, design elements, and interactivity. Here's a breakdown of the technical
specifications for the Geometric Shapes Mini-Project HTML code:
1. Document Structure:
- The HTML document follows the `<!DOCTYPE html>` declaration, indicating that it's
written in HTML5.
- The primary language of the document is set to English (`
<html lang="en">`).
- The document contains a `<head>` section where metadata such as character set,
viewport configuration, and page title are defined.
- Within the `<body>` section, the content of the page is structured into several `<section>`
elements, each focusing on a specific aspect of the mini-project.
2. Styling:
- The styles for the document are defined internally within a `<style>` element in the
`<head>` section.
- Font styles, margins, padding, colors, and other visual properties are specified using CSS.
- Responsive design techniques are applied using relative units and media queries to
ensure proper display across various devices and screen sizes.
3. Header Section:
- The `<header>` element contains the title of the mini-project, styled with centered text
and a background color.
4. About Section:
- The `<section>` element with the "About" heading provides information about the
purpose and scope of the mini-project.
- A brief description of the project's objective is provided within a `<p>` element.
<label>`) for each input field, enhancing accessibility and user experience.
- Input fields (`
<input>`) are configured with appropriate attributes such as `type`, `id`, `name`, and
`required` for validation and submission.
- Password fields are masked to enhance security (`type="password"`).
- Form submission is handled via JavaScript event listeners (`onsubmit`) calling validation
functions to ensure data integrity.
- Error messages are displayed dynamically below each form to provide feedback to users
in case of validation errors.
- Links for switching between different forms (`Sign-up`, `Register`, `Back to Sign In`) are
provided for user convenience.
- JavaScript functions (`validateForm()`, `validateSignUpForm()`,
`validateRegistrationForm()`, `showForm()`) are implemented to handle form validation and
form switching functionality.
- Redirects to different pages (`signin.html`) are triggered upon successful form submission.
6. Footer Section:
- The `<footer>` element contains copyright information and is styled with a background
color and centered text.
7. Scripting:
- JavaScript functions are used to handle form validation, form switching, and redirection
logic.
- Event listeners (`onclick`, `onsubmit`) are attached to HTML elements to trigger JavaScript
functions.
- The script is placed at the bottom of the document to ensure that the HTML content is
loaded before the script runs, improving performance.
8. Interactivity:
- The mini-project provides a seamless user experience with interactive form elements and
dynamic error messages.
- Users can switch between sign-in, sign-up, and registration forms without reloading the
page, enhancing usability.
- Client-side form validation ensures that users provide valid input data before submission,
reducing the likelihood of errors and improving data integrity.
- Redirects to appropriate pages after successful form submission provide a smooth flow
through the application.
Overall, the Geometric Shapes Mini-Project HTML code demonstrates effective use of HTML,
CSS, and JavaScript to create a user-friendly and interactive web application for exploring
geometric shapes and managing user accounts.
The provided HTML code constitutes a web page for a Geometric Shapes Mini-Project, which
aims to explore various geometric shapes, their areas, and applications in real life. Below is a
detailed technical specification of the code:
2. Meta Tags:
- The `<meta charset="UTF-8">` tag specifies the character encoding of the document as
UTF-8, allowing for proper rendering of special characters.
- The `<meta name="viewport" content="width=device-width, initial-scale=1.0">` tag sets
the viewport width to the device width and initial zoom level to 1.0, ensuring proper scaling
on various devices.
3. Title:
- The `<title>` element defines the title of the web page, which is "Geometric Shapes Mini-
Project".
4. CSS Styling:
- The `<style>` element contains CSS rules that define the appearance of various elements
on the web page.
- Styles are applied to elements such as `body`, `header`, `section`, `h2`, `p`, `code`, `ul`,
`li`, `img`, `footer`, `form`, `label`, `input`, `button`, `.form-switch`, and `.error-message`.
- CSS rules specify font families, colors, margins, padding, backgrounds, border properties,
box shadows, and other visual aspects to achieve a consistent and visually appealing layout.
5. Header Section:
- The `<header>` element contains the main heading of the web page, styled with a
centered text alignment and a background color of `#FFB6C1`.
6. Sections:
- Multiple `<section>` elements divide the content of the page into logical sections such as
"About", "Shapes and Areas", and "Applications".
- Each section contains `<h2>` headings and `<p>` paragraphs to provide structured
information to the user.
<ul>`) that presents various geometric shapes along with their corresponding area
calculation formulas.
- Each list item (`
<li>`) describes a specific geometric shape, such as circle, square, triangle, rectangle, sphere,
cube, cone, and cuboid.
- For each shape, an `<img>` element is used to display an image representation of the
shape, with height and alt attributes provided for accessibility.
- The area calculation formulas for each shape are presented using `<code>` elements for
proper formatting.
8. Applications Section:
- The "Applications" section provides information about the practical applications of
geometric shapes in various fields.
- A series of `<p>` elements with links to individual pages (`
<a href="...">`) are provided for further exploration of each shape's applications.
- Additionally, a link to a "Contact us" page is included for users to reach out with inquiries
or feedback.
9. Footer:
- The `<footer>` element contains copyright information and is styled similarly to the
header for consistency.
Overall, the technical specification outlines the structure, styling, and functionality of the
provided HTML code, explaining how it creates a visually appealing and interactive web page
for the Geometric Shapes Mini-Project.
The provided HTML code is a web page focusing on the geometric shape of a circle, its
applications, and a form for calculating various properties of a circle. Here's a detailed
technical specification for the code:
2. Style (CSS):
- The `<style>` tags in the `<html>` section contain CSS rules for styling various elements of
the page.
- Styles include font families, colors, margins, padding, border properties, and image
dimensions.
3. Body Structure:
- The `<body>` section contains the main content of the page, including headers,
paragraphs, images, forms, and a results section.
- Semantic HTML elements like `<h1>`, `<h2>`, `<h3>`, `<p>`, `<form>`, and `<div>` are used
for structured content.
4. Header Section:
- The `<h1>` element displays the main heading of the page, "Circle."
5. Images:
- An image of a circle is displayed using the `<img>` tag, with the `src`, `height`, and `alt`
attributes.
6. Applications Section:
- The `<h2>` element "Applications" introduces a list of applications of circles.
- Each application is described with a `<p>` element, and subheadings (`
8. JavaScript:
- Inline JavaScript is included within `<script>` tags at the end of the document.
- The `calculateCircleProperties(radius)` function calculates the area, perimeter
(circumference), and surface area of a circle based on the given radius.
- An event listener is added to the form submission event to trigger the calculation and
display the results dynamically.
9. Event Handling:
- The form submission event is intercepted using JavaScript's `addEventListener` method to
prevent the default form submission behavior.
- Input validation ensures that the radius entered by the user is a valid number. If not, an
alert is displayed.
- Upon successful submission, the calculated circle properties are displayed in the results
section.
10. Results Display:
- The results are dynamically inserted into the `<div>` element with the id "results" using
JavaScript's innerHTML property.
- The calculated properties, including area, perimeter, and surface area, are displayed in
formatted text.
12. Accessibility:
- Accessibility features such as ARIA roles or landmarks are not explicitly implemented in
the code. However, the use of semantic HTML elements promotes accessibility to some
extent.
14. Security:
- The code doesn't involve user authentication or sensitive data handling, so security
measures beyond basic input validation are not necessary.
15. Modularity:
- The code is structured in a modular manner, with separate sections for content display,
form input, JavaScript functions, and results presentation.
- This modular structure enhances code readability, maintenance, and scalability.
16. Comments:
- Comments are absent from the JavaScript code, which could improve code readability
and facilitate collaboration among developers.
In summary, the provided HTML code creates a user-friendly web page for exploring the
concept of circles, their applications, and calculating their properties interactively. It
demonstrates a combination of HTML, CSS, and JavaScript to deliver a functional and
informative user experience.
In conclusion, the technical specification provides a comprehensive overview of the HTML
code for the Geometric Shapes Mini-Project. The document meticulously breaks down each
component of the code, from the document type declaration to the JavaScript functionality,
elucidating its purpose, structure, and styling. By dissecting the code into distinct sections
and elucidating their functionalities, the specification facilitates a deeper understanding of
how the web page is designed and how it functions.
The HTML code showcases a visually appealing and user-friendly interface that educates
users about various geometric shapes, their formulas for calculating area, and their real-
world applications. Each section of the web page is meticulously crafted to deliver relevant
information effectively. From the header and sections detailing different shapes to the
applications section and footer, every element is thoughtfully designed and styled for
consistency and clarity.
Furthermore, the specification highlights the use of CSS for styling elements, ensuring a
visually appealing presentation across different devices and screen sizes. The inclusion of
JavaScript adds interactivity to the page, allowing users to toggle between different forms
seamlessly.
Overall, the technical specification serves as a valuable resource for understanding the
intricacies of the Geometric Shapes Mini-Project's HTML code. It provides developers with
insights into how the web page is structured, styled, and made interactive, empowering
them to create similar projects or further enhance existing ones.
PROPOSED SYSTEM DESIGN:
Proposed System Design for Geometric Shapes Mini-Project:
Introduction:
The proposed system design aims to enhance the functionality, user experience, and
maintainability of the Geometric Shapes Mini-Project. This design will focus on refining the
existing features, adding new functionalities, optimizing performance, and ensuring
scalability for future development.
1. Architecture:
The system will adopt a client-server architecture, with the client-side implemented using
HTML, CSS, and JavaScript, and the server-side implemented using a suitable backend
technology such as Node.js with Express.js or Python with Django. The client-server
communication will be facilitated through RESTful APIs.
2. Frontend:
a. HTML Structure: The HTML structure will be organized into modular components to
improve maintainability and reusability. Each section of the web page, such as About, Sign-
in, Sign-up, and Registration, will be encapsulated within separate HTML files.
b. CSS Styling: CSS will be utilized for styling the user interface, ensuring consistency,
responsiveness, and aesthetic appeal across different devices and screen sizes. The existing
styles will be refined, and additional styles will be added as needed.
c. JavaScript Interactivity: JavaScript will be leveraged to enhance interactivity, validate user
inputs, and facilitate dynamic content loading. Event-driven programming will be employed
to handle user actions such as form submissions, toggling between different forms, and
displaying error messages.
3. Backend:
a. RESTful API Design: The backend will expose RESTful APIs to handle various client requests
such as user authentication, user registration, and data retrieval. The API endpoints will
follow standard HTTP methods (GET, POST, PUT, DELETE) and adhere to RESTful principles for
uniformity and consistency.
b. User Authentication: User authentication will be implemented using JSON Web Tokens
(JWT) or sessions to securely manage user sessions and validate user identities during login
and registration processes. Passwords will be hashed using bcrypt for enhanced security.
c. Database Integration: A relational or NoSQL database (e.g., MySQL, MongoDB) will be
utilized to store user data, including user profiles, credentials, and session information.
Database operations will be performed using an ORM (Object-Relational Mapping) library to
abstract away database-specific details and ensure portability.
d. Error Handling and Logging: Proper error handling mechanisms will be implemented to
gracefully handle exceptions, validate input data, and provide informative error messages to
users. Additionally, logging functionality will be incorporated to record system events,
monitor application health, and facilitate debugging.
4. Security:
a. Input Validation: Input validation will be enforced on both client and server sides to
mitigate common security vulnerabilities such as SQL injection, cross-site scripting (XSS), and
cross-site request forgery (CSRF). Regular expressions and validation libraries will be
employed to sanitize and validate user inputs.
b. HTTPS Encryption: All communication between the client and server will be encrypted
using HTTPS to protect sensitive information from eavesdropping and man-in-the-middle
attacks. SSL/TLS certificates will be configured and maintained to ensure secure data
transmission.
c. Role-Based Access Control (RBAC): RBAC will be implemented to enforce access control
policies and restrict certain functionalities based on user roles. For example, only
authenticated users will be allowed to access protected resources such as user profiles and
account settings.
5. Performance Optimization:
a. Caching: Caching mechanisms (e.g., browser caching, server-side caching) will be
employed to reduce latency and improve response times by storing frequently accessed data
in memory or on disk. This will enhance the overall performance of the application,
especially for static assets and database queries.
b. Content Delivery Network (CDN): Static assets such as images, stylesheets, and scripts will
be served through a CDN to distribute content geographically and minimize server load. This
will improve load times and ensure consistent delivery of content to users worldwide.
c. Compression: Data compression techniques (e.g., GZIP compression) will be utilized to
reduce the size of transmitted data, resulting in faster page loading times and reduced
bandwidth consumption.
Introduction:
The Geometric Shapes Mini-Project aims to provide users with information about various
geometric shapes, their areas, applications, and interactive calculators to compute their
properties. The proposed system design outlines the architecture, components, and
functionalities of the web application.
1. System Architecture:
The proposed system follows a client-server architecture model. It consists of three main
components:
- Client-side: The web browser used by the user to access the application.
- Server-side: The web server hosting the application logic, data processing, and database
management.
- Database: Stores geometric shape data, user information, and other relevant data.
2. Client-Side Components:
The client-side interface is developed using HTML, CSS, and JavaScript. It includes:
- HTML: Structure and content of the web pages, such as headers, sections, forms, and links.
- CSS: Styling rules to enhance the visual appeal and layout of the pages, ensuring a
consistent user experience.
- JavaScript: Provides interactivity, form validation, and dynamic content generation,
enhancing user engagement.
3. Server-Side Components:
The server-side logic is implemented using a server-side scripting language such as PHP or
Node.js. It performs the following functions:
- Request handling: Receives HTTP requests from the client, processes them, and generates
appropriate responses.
- Data processing: Computes geometric shape properties, validates user inputs, and interacts
with the database.
- Session management: Manages user sessions, authentication, and authorization to ensure
secure access to the application.
- Database interaction: Executes database queries to retrieve, update, or delete data related
to geometric shapes, user accounts, and application settings.
4. Database Design:
The system utilizes a relational database management system (RDBMS) such as MySQL or
PostgreSQL. The database schema includes the following tables:
- Shapes: Stores information about geometric shapes, including their names, formulas, and
images.
- Users: Contains user account details, such as usernames, passwords (hashed for security),
and email addresses.
- Sessions: Manages active user sessions, storing session IDs, user IDs, and expiration
timestamps.
- Logs: Records system activities, user interactions, and errors for monitoring and analysis
purposes.
5. Functionalities:
The Geometric Shapes Mini-Project offers the following functionalities to users:
- Shape Information: Displays details about various geometric shapes, including their names,
formulas, and images.
- Area Calculator: Provides interactive calculators for computing the area of different shapes
based on user inputs.
- Applications Overview: Presents real-life applications and use cases of geometric shapes in
various fields such as architecture, engineering, and art.
- Contact Form: Allows users to submit inquiries, feedback, or requests for additional
information via a contact form.
7. Security Considerations:
To ensure data security and user privacy, the system implements the following measures:
- Secure Communication: Utilizes HTTPS protocol to encrypt data transmitted between the
client and server, preventing eavesdropping and tampering.
- User Authentication: Requires users to authenticate using credentials (e.g., username and
password) to access restricted functionalities and personal data.
- Password Hashing: Stores user passwords securely by hashing them using cryptographic
algorithms (e.g., bcrypt) before storage.
- Input Validation: Validates user inputs to prevent injection attacks, cross-site scripting
(XSS), and other security vulnerabilities.
- Session Management: Implements secure session handling mechanisms to prevent session
hijacking and unauthorized access to user accounts.
Conclusion:
The proposed system design for the Geometric Shapes Mini-Project outlines a client-server
architecture with interactive features, database integration, and security measures to deliver
an informative and engaging user experience. By leveraging modern web technologies and
best practices, the system aims to provide valuable insights into geometric shapes and their
applications while ensuring data integrity and user privacy.
MODULE DESCRIPTION:
Module Description:
2. CSS Styling:
- The embedded CSS stylesheets define the visual presentation and layout of the web
page.
- Styles are applied to elements such as headers, paragraphs, forms, buttons, and links to
enhance the overall appearance and usability.
- Utilizes responsive design techniques to ensure compatibility with various screen sizes
and devices.
3. Client-Side JavaScript:
- JavaScript functions are integrated into the HTML file to add interactivity and form
validation.
- Functions like `validateForm()`, `validateSignUpForm()`, and `validateRegistrationForm()`
handle form submission and input validation.
- The `showForm()` function dynamically switches between different forms (sign-in, sign-
up, registration) based on user interactions.
4. User Authentication and Registration:
- The sign-in and sign-up forms enable users to authenticate and register for the service.
- Input fields for email, password, first name, last name, phone number, date of birth, and
college are provided.
- Client-side validation ensures that users provide valid inputs before submission.
- Error messages are displayed to guide users if input validation fails.
5. Form Switching:
- Users can switch between different forms (sign-in, sign-up, registration) using the links
provided in each section.
- The `showForm()` function controls the visibility of form elements based on user clicks.
6. Error Handling:
- Error messages are displayed prominently to notify users of any validation errors during
form submission.
- Messages inform users about invalid email addresses, password length requirements, and
password mismatches.
7. Footer:
- The footer section contains copyright information and serves as a navigational aid for
users.
- It ensures consistency in design and provides essential information about the project.
1. HTML Structure:
- The HTML structure defines the layout and content of the web pages.
- It includes elements such as headers, sections, lists, images, and links.
- Each section of the webpage is organized to present information about geometric shapes,
their areas, applications, and contact details.
2. CSS Styling:
- CSS rules are used to style the HTML elements, enhancing the visual appeal and layout of
the pages.
- It includes styling for headers, text, images, forms, buttons, and links.
- CSS is also responsible for creating a responsive design that adapts to different screen
sizes and devices.
3. JavaScript Interactivity:
- JavaScript functions provide interactivity and dynamic behavior to the web pages.
- The `showForm()` function is triggered by user actions to display different forms (sign-in,
sign-up, registration) based on the form ID parameter.
- Client-side validation and form handling may also be implemented using JavaScript to
improve user experience and data integrity.
4. Header:
- The header section contains the title of the web application, "Geometric Shapes - Area
and applications".
- It features a centered layout with a background color and white text for better visibility.
5. About Section:
- This section provides a brief overview of the mini-project, explaining its purpose and
scope.
- Users can learn about the project's objective and what they can expect to find on the
website.
8. Footer:
- The footer section displays copyright information and credits for the mini-project.
- It features a centered layout with a background color consistent with the header for
aesthetic consistency.
9. Script:
- The script section contains JavaScript code responsible for handling user interactions and
form display.
- The `showForm()` function dynamically switches between different forms based on user
actions, enhancing user experience and usability.
Overall, the module description outlines the different components and functionalities of the
Geometric Shapes Mini-Project, highlighting how HTML, CSS, and JavaScript are utilized to
create an interactive and informative web application.
UML DIAGRAM/PSEUDOCODE:
SIGNIN PAGE:
-------------------------------------
| HTML Page |
-------------------------------------
| |
| + head |
| - meta charset |
| - meta viewport |
| - title |
| - style (CSS) |
| + body |
| - header |
| | - h1 |
| - section (About) |
| | - h2 |
| | -p |
| - section (Sign-in) |
| | - form (signin-form) |
| | | - label (Email) |
| | | - input (Email) |
| | | - label (Password) |
| | | - input (Password) |
| | | - button (Sign In) |
| | - div (form-switch) |
| | - a (Sign Up) |
| | - div (error-message) |
| - script (JavaScript functions) |
| - section (Sign-up) |
| | - form (signup-form) |
| | | - label (First Name) |
| | | - input (First Name) |
| | | - label (Last Name) |
| | | - input (Last Name) |
| | | - label (Email) |
| | | - input (Email) |
| | | - label (Password) |
| | | - input (Password) |
| | | - label (Confirm Password) |
| | | - input (Confirm Password) |
| | | - button (Sign Up) |
| | - div (form-switch) |
| | - div (form-switch) |
| | - div (signup-error-message) |
| - script (JavaScript functions) |
| - section (Registration) |
| | - form (registration-form) |
| | | - label (First Name) |
| | | - input (First Name) |
| | | - label (Last Name) |
| | | - input (Last Name) |
| | | - label (Phone number) |
| | | - input (Phone number) |
| | | - label (Email) |
| | | - input (Email) |
| | | - label (Date of Birth) |
| | | - input (Date of Birth) |
| | | - label (College) |
| | | - input (College) |
| | | - label (Password) |
| | | - input (Password) |
| | | - label (Confirm Password) |
| | | - input (Confirm Password) |
| | | - button (Register) |
| | - div (form-switch) |
| | - div (registration-error-message) |
| - script (JavaScript functions) |
| - footer |
| - p (Copyright) |
| |
This UML diagram provides an overview of the HTML structure, including the elements,
forms, JavaScript functions, and their relationships. Each section, form, and script block is
represented along with their respective contents.
PSEUDOCODE:
HTML Page:
Define document structure with head and body elements
Head:
Define metadata such as character set and viewport
Set the title of the page
Include CSS styles for page layout and formatting
Body:
Define the visible content of the page
Header:
Display the title of the project
Section (About):
Display information about the project, including its purpose and objectives
Section (Sign-in):
Display a form for users to sign in
Include fields for email and password
Validate email and password inputs
Provide error messages if validation fails
Allow users to switch to the sign-up form if they don't have an account
Include JavaScript functions for form validation and submission
Section (Sign-up):
Display a form for users to sign up
Include fields for first name, last name, email, password, and confirm password
Validate email, password, and confirm password inputs
Provide error messages if validation fails
Allow users to switch to the sign-in form if they already have an account
Include JavaScript functions for form validation and submission
Section (Registration):
Display a form for users to register
Include fields for first name, last name, phone number, email, date of birth, college,
password, and confirm password
Validate email, password, and confirm password inputs
Provide error messages if validation fails
Allow users to switch back to the sign-in form if they already have an account
Include JavaScript functions for form validation and submission
Footer:
Display the copyright information for the project
HOME PAGE:
+----------------------------------------+
| HTML Page |
+----------------------------------------+
| <head> |
| - meta charset="UTF-8" |
| - meta viewport="width=device-width, |
| initial-scale=1.0" |
| - title "Geometric Shapes Mini-Project"|
| - CSS stylesheets |
+----------------------------------------+
| <body> |
| - header |
| - h1 "Geometric Shapes - Area and |
| applications" |
| - section: About |
| - h2 "About" |
| -p |
| - section: Shapes and Areas |
| - h2 "Shapes and Areas" |
| - ul |
| - li (Circle) |
| - img (Circle) |
| - li (Square) |
| - img (Square) |
| - li (Triangle) |
| - img (Triangle) |
| - ... (other shapes) |
| - section: Applications |
| - h2 "Applications" |
| -p |
| - list of links to shape pages |
| - footer |
| - p "© 2024 Geometric Shapes |
| Mini-Project" |
| - JavaScript script for form handling |
+----------------------------------------+
PSEUDOCODE:
1. Define HTML document structure:
a. Set document charset and viewport.
b. Title the document.
c. Include CSS styles.
3. JavaScript:
a. Define a function `showForm(formId)` to toggle form visibility based on `formId`.
RESULT WITH EXPLAINATION:
SIGNIN PAGE:
EXPLAINATION:
This HTML code defines a webpage for a Geometric Shapes Mini-Project. Here's an
explanation of its structure and functionality:
1. Head Section:
- Meta tags define the character set and viewport settings.
- The title of the page is set to "Geometric Shapes Mini-Project".
- Inline CSS styles are included to define the visual presentation of the page.
2. Body Section:
- Header: Contains the project title.
- About Section: Describes the purpose of the mini-project.
- Sign-in Section: Includes a form for users to sign in. It captures email and password inputs
and validates them using JavaScript. If the sign-in is successful, it redirects to a "signin.html"
page.
- Sign-up Section: Provides a form for new users to sign up. It captures first name, last
name, email, password, and confirms the password. It validates the inputs using JavaScript
and redirects to the "signin.html" page upon successful registration.
- Registration Section: Offers a more detailed registration form with additional fields such
as phone number, date of birth, and college. It also validates inputs and allows submission
upon successful validation.
- Footer: Contains the copyright information.
3. JavaScript Section:
- Defines a function `showForm(formId)` to toggle the visibility of different forms based on
the `formId`.
- Includes validation functions for sign-in, sign-up, and registration forms.
Overall, this code provides a simple interface for users to sign in, sign up, and register for the
geometric shapes mini-project, along with basic validation mechanisms to ensure data
integrity.
HOME PAGE:
RESULT:
EXPLAINATION:
This HTML code creates a webpage for a Geometric Shapes Mini-Project. Here's a
breakdown of its components and functionality:
1. Head Section:
- Meta tags define the character set and viewport settings.
- The title of the page is set to "Geometric Shapes Mini-Project".
- Inline CSS styles are included to define the visual presentation of the page.
2. Body Section:
- Header: Contains the project title.
- About Section: Describes the purpose of the mini-project.
- Shapes and Areas Section: Lists various geometric shapes (Circle, Square, Triangle,
Rectangle, Sphere, Cube, Cone, Cuboid) along with their respective images and formulas for
calculating their areas.
- Applications Section: Describes the applications of geometric shapes in various fields and
provides links to individual pages for each shape for further details.
- Footer: Contains the copyright information.
3. JavaScript Section:
- Defines a function `showForm(formId)` to toggle the visibility of different forms based on
the `formId`.
Overall, this webpage serves as an educational resource for learning about geometric
shapes, their areas, applications, and provides links for further exploration. It's visually
appealing with a clean layout and informative content.
OTHER SUBPAGES:
RESULT:
EXPLAINATION:
This HTML code creates a webpage specifically focused on circles. Here's a breakdown of its
structure and functionality:
1. Styling:
- CSS is used to style the elements of the page, including fonts, colors, margins, and
padding.
- Images are constrained to a size of 200px by 200px.
2. Body Section:
- Header: Displays the title "Circle" in the center of the page with a pink background.
- Applications Section: Lists various applications of circles in different fields such as
architecture, engineering, navigation, surveying, optics, art, sports, mechanical and
industrial applications, traffic engineering, and timekeeping.
- Calculating Circle Properties Section:
- Contains a form where users can input the radius of a circle.
- Upon submitting the form, JavaScript is used to calculate and display the area, perimeter
(circumference), and surface area of the circle, assuming it's a sphere.
- An event listener is attached to the form submission to trigger the calculation function.
- The results are displayed below the form.
3. JavaScript Section:
- Defines a function `calculateCircleProperties(radius)` to calculate the area, perimeter, and
surface area of a circle based on its radius.
- Attaches an event listener to the form submission to handle user input, calculate the
circle properties, and display the results dynamically.
Overall, this webpage provides information about the applications of circles and allows users
to calculate various properties of circles interactively. It's a useful educational resource for
learning about circles and their practical significance.
CONCLUSION:
Introduction:
The project comprises a web-based interface built using HTML, CSS, and JavaScript. These
technologies work together to create a visually appealing and interactive experience for
users. The HTML code forms the structure of the web pages, defining the layout and
content. CSS stylesheets enhance the presentation of the content, providing visual
consistency and responsiveness across different devices. JavaScript adds functionality to the
project, enabling client-side validation of user input and dynamic interaction with the web
pages.
The project begins with an introductory section that provides an overview of the topics
covered. Users are introduced to the concept of geometric shapes and their significance in
various fields such as architecture, art, and engineering. This section aims to pique the user's
interest and set the stage for further exploration.
The next sections of the project focus on user authentication and registration. Users are
presented with sign-in and sign-up forms where they can either log in with existing
credentials or create a new account. The sign-in form prompts users to enter their email
address and password, with client-side validation ensuring that the input is in the correct
format. Similarly, the sign-up form collects user information such as first name, last name,
email, and password, with additional validation to ensure data integrity. These forms provide
a seamless user experience, guiding users through the authentication and registration
process.
Registration Form:
For users who wish to provide more information, the registration form offers additional
fields such as phone number, date of birth, and college. This form expands upon the sign-up
process, allowing users to provide optional details that may be useful for future
communication or customization. Client-side validation is once again employed to verify the
accuracy of the input data, ensuring a smooth registration experience.
Interactive Features:
Throughout the project, interactive features such as form validation and error messaging
enhance the user experience. JavaScript functions are used to validate user input in real-
time, providing immediate feedback on any errors or discrepancies. For example, if a user
enters an invalid email address or a password that does not meet the minimum length
requirement, an error message is displayed, prompting the user to correct the input. These
interactive features help users navigate the various forms and ensure that their data is
entered accurately.
Responsive Design:
One of the key considerations in designing the project is responsiveness. The web interface
is optimized to provide a consistent experience across different devices and screen sizes. CSS
media queries are used to adjust the layout and styling based on the viewport dimensions,
ensuring that the content remains readable and accessible on both desktop and mobile
devices. This responsiveness is essential for catering to users who may access the project
from a variety of devices, including smartphones, tablets, and laptops.
Conclusion:
REFERENCES:
4. MDN Web Docs. (n.d.). HTML: Hypertext Markup Language. Retrieved from
https://developer.mozilla.org/en-US/docs/Web/HTML
5. MDN Web Docs. (n.d.). CSS: Cascading Style Sheets. Retrieved from
https://developer.mozilla.org/en-US/docs/Web/CSS
10. Freeman, E., Robson, E., & Bates, B. (2004). Head First HTML with CSS & XHTML. O'Reilly
Media.
11. Freeman, E., Robson, E., & Sierra, K. (2005). Head First JavaScript. O'Reilly Media.
12. Robbins, J., & Beeby, A. (2010). Programming the Web Using XHTML and JavaScript.
Course Technology.
13. Galitz, W. O. (2007). The Essential Guide to User Interface Design: An Introduction to GUI
Design Principles and Techniques. Wiley.
14. Tidwell, J. (2010). Designing Interfaces: Patterns for Effective Interaction Design. O'Reilly
Media.
15. Norman, D. A. (2013). The Design of Everyday Things: Revised and Expanded Edition.
Basic Books.
16. Cooper, A., Reimann, R., & Cronin, D. (2007). About Face 3: The Essentials of Interaction
Design. Wiley.
17. Krug, S. (2014). Don't Make Me Think, Revisited: A Common Sense Approach to Web
Usability. New Riders.
These references cover various aspects of web development, usability, user interface design,
and JavaScript programming, providing a solid foundation for the creation of the Geometric
Shapes Mini-Project.
CODE:
SIGNIN PAGE:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Geometric Shapes Mini-Project</title>
<style>
img{
height: 200px;
width:200px;
}
body {
font-family: Arial, sans-serif;
margin: 20px;
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-position: center;
}
header {
text-align: center;
background-color: #FFB6C1;
color: #fff;
padding: 10px;
}
section {
margin-top: 20px;
}
h2 {
color: #FFB6C1;
}
p {
line-height: 1.6;
}
code {
background-color: #ecf0f1;
padding: 2px 5px;
border-radius: 4px;
}
ul {
list-style-type: none;
padding: 0;
}
li {
margin-bottom: 5px;
}
img {
max-width: 100%;
height: auto;
border: 1px solid #ddd;
border-radius: 4px;
padding: 5px;
}
footer {
text-align: center;
margin-top: 20px;
padding: 10px;
background-color:#FFB6C1;
color: #fff;
}
form {
max-width: 400px;
margin: 0 auto;
background-color: #fff;
padding: 20px;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
label {
display: block;
margin-bottom: 8px;
font-weight: bold;
}
input {
width: 100%;
padding: 8px;
margin-bottom: 15px;
box-sizing: border-box;
border: 1px solid #ccc;
border-radius: 4px;
}
button {
background-color:#FFB6C1;
color: #fff;
padding: 10px;
border: none;
border-radius: 4px;
cursor: pointer;
}
button:hover {
background-color:#FFB6C1;
.form-switch {
text-align: center;
margin-top: 20px;
}
.form-switch a {
color: #FFB6C1;
text-decoration: none;
cursor: pointer;
}
.form-switch a:hover {
text-decoration: underline;
}
</style>
</head>
<body>
<header>
<h1>Geometric Shapes - Area and applications</h1>
</header>
<section>
<h2>About</h2>
<p>This mini-project explores various geometric shapes, their areas, and
applications in real life.</p>
</section>
<section>
<h2>Shapes and Areas</h2>
<ul>
<li><strong>Circle:</strong> The area of a circle is calculated using the
formula <code>πr²</code>.</li>
<img src="circle.jpeg" height="200" alt="Circle">
<br><br><br>
<li><strong>Square:</strong> The area of a square is calculated by squaring the
length of one side.</li>
<img src="square.jpeg" height="200" alt="Square">
<br><br><br>
<li><strong>Triangle:</strong> The area of a triangle is calculated using the
formula <code>(base * height) / 2</code>.</li>
<img src="triangle.jpeg" alt="Triangle">
<br><br><br>
<li><strong>Rectangle:</strong>The area of rectangle is calculated using the
formula <code>length x width</code>.</li>
<img src="rectangle.jpeg" alt="Rectangle">
<br><br><br>
<li><strong>Sphere:</strong>The area of sphere is calculated using the formula
<code>4π(r)^2</code></li>
<img src="sphere.jpeg" alt="Sphere">
<br><br><br>
<li><strong>Cube:</strong>The area of cube is calculated using the formula
<code>6(a)^2</code>.</li>
<img src="cube.jpeg" alt="Cube">
<br><br><br>
<li><strong>Cone:</strong>The area of cone is calculated using the formula
<code>πr(r+l)</code></li>
<img src="cone.jpeg" alt="Cone">
<br><br><br>
<li><strong>Cuboid:</strong>The area of the cuboid is calculated using the
formula <code>2(lb + bh + hl)</code> </li>
<img src="cuboid.jpeg" alt="Cuboid">
<br><br><br>
</ul>
</section>
<section>
<h2>Applications</h2>
<p>Geometric shapes find applications in various fields such as architecture,
engineering, art, and more.</p>
<br>Click the links below to know more:
<p><a href="circle.html">Circle</a></p>
<p><a href="square.html">Square</a></p>
<p><a href="triangle.html">Triangle</a></p>
<p><a href="rectangle.html">Rectangle</a></p>
<p><a href="sphere.html">Sphere</a></p>
<p><a href="cube.html">Cube</a></p>
<p><a href="cone.html">Cone</a></p>
<p><a href="cuboid.html">Cuboid</a></p>
<br><br>
<p><a href="contact.html">Contact us</a></p>
</section>
<footer>
<p>© 2024 Geometric Shapes Mini-Project</p>
</footer>
<script>
function showForm(formId) {
document.getElementById('signin-form').style.display = 'none';
document.getElementById('signup-form').style.display = 'none';
document.getElementById('registration-form').style.display = 'none';
document.getElementById(formId).style.display = 'block';
}
</script>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Geometric Shapes Mini-Project</title>
<style>
img{
height: 200px;
width:200px;
}
body {
font-family: Arial, sans-serif;
margin: 20px;
}
header {
text-align: center;
background-color: #FFB6C1;
color: #fff;
padding: 10px;
}
section {
margin-top: 20px;
}
h2 {
color: #FFB6C1;
}
p {
line-height: 1.6;
}
code {
background-color: #ecf0f1;
padding: 2px 5px;
border-radius: 4px;
}
ul {
list-style-type: none;
padding: 0;
}
li {
margin-bottom: 5px;
}
img {
max-width: 100%;
height: auto;
border: 1px solid #ddd;
border-radius: 4px;
padding: 5px;
}
footer {
text-align: center;
margin-top: 20px;
padding: 10px;
background-color:#FFB6C1;
color: #fff;
}
form {
max-width: 400px;
margin: 0 auto;
background-color: #fff;
padding: 20px;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
label {
display: block;
margin-bottom: 8px;
font-weight: bold;
}
input {
width: 100%;
padding: 8px;
margin-bottom: 15px;
box-sizing: border-box;
border: 1px solid #ccc;
border-radius: 4px;
}
button {
background-color:#FFB6C1;
color: #fff;
padding: 10px;
border: none;
border-radius: 4px;
cursor: pointer;
}
button:hover {
background-color:#FFB6C1;
.form-switch {
text-align: center;
margin-top: 20px;
}
.form-switch a {
color: #FFB6C1;
text-decoration: none;
cursor: pointer;
}
.form-switch a:hover {
text-decoration: underline;
}
</style>
</head>
<body>
<header>
<h1>Geometric Shapes - Area and applications</h1>
</header>
<section>
<h2>About</h2>
<p>This mini-project explores various geometric shapes, their areas,
and applications in real life.</p>
</section>
<section>
<h2>Sign-in</h2>
<form id="signin-form" onsubmit="return validateForm()">
<label for="signin-email">Email:</label>
<input type="email" id="signin-email" name="signin-email"
required>
<label for="signin-password">Password:</label>
<input type="password" id="signin-password" name="signin-password"
required>
<div class="form-switch">
<a onclick="showForm('signup-form')">Don't have an account? Sign
Up</a>
</div>
<script>
function validateForm() {
var email = document.getElementById("signin-email").value;
var password = document.getElementById("signin-
password").value;
var errorMessage = document.getElementById("error-message");
function redirectToHomePage() {
// Replace "home.html" with the actual URL of your home page
window.location.href = "signin.html";
}
</script>
</section>
<section>
<h2>Sign-up</h2>
<form id="signup-form" onsubmit="return validateSignUpForm()">
<label for="signup-fname">First Name:</label>
<input type="text" id="signup-fname" name="signup-fname" required>
<label for="signup-email">Email:</label>
<input type="email" id="signup-email" name="signup-email"
required>
<label for="signup-password">Password:</label>
<input type="password" id="signup-password" name="signup-password"
required>
<script>
function validateSignUpForm() {
var firstName = document.getElementById("signup-fname").value;
var lastName = document.getElementById("signup-lname").value;
var email = document.getElementById("signup-email").value;
var password = document.getElementById("signup-
password").value;
var confirmPassword = document.getElementById("signup-
cpassword").value;
var errorMessage = document.getElementById("signup-error-
message");
<section>
<h2>Registration</h2>
<form id="registration-form" style="display: none;" onsubmit="return
validateRegistrationForm()">
<label for="registration-fname">First name:</label>
<input type="text" id="registration-fname" name="registration-
fname" required>
<label for="registration-email">Email:</label>
<input type="email" id="registration-email" name="registration-
email" required>
<label for="registration-college">College:</label>
<input type="text" id="registration-college" name="registration-
college" required>
<label for="registration-password">Password:</label>
<input type="password" id="registration-password"
name="registration-password" required>
<button type="submit">Register</button>
</form>
<div class="form-switch">
<a onclick="showForm('signin-form')">Back to Sign In</a>
</div>
<!-- Error message will be displayed here -->
<div id="registration-error-message" class="error-message"></div>
<script>
function validateRegistrationForm() {
var firstName = document.getElementById("registration-
fname").value;
var lastName = document.getElementById("registration-
lname").value;
var phone = document.getElementById("registration-
phone").value;
var email = document.getElementById("registration-
email").value;
var dob = document.getElementById("registration-dob").value;
var college = document.getElementById("registration-
college").value;
var password = document.getElementById("registration-
password").value;
var confirmPassword = document.getElementById("registration-
cpassword").value;
var errorMessage = document.getElementById("registration-
error-message");
<script>
function showForm(formId) {
document.getElementById('signin-form').style.display = 'none';
document.getElementById('signup-form').style.display = 'none';
document.getElementById('registration-form').style.display =
'none';
document.getElementById(formId).style.display = 'block';
}
</script>
</body>
</html>
<html>
<style>
img{
height: 200px;
width:200px;
}
body {
font-family: Arial, sans-serif;
margin: 20px;
}
header {
text-align: center;
background-color: #FFB6C1;
color: #fff;
padding: 10px;
}
section {
margin-top: 20px;
}
h1 {
color: #FFB6C1;
}
h2{
color: #FFB6C1;
}
h3{
color:darkred
}
p {
line-height: 1.6;
}
code {
background-color: #ecf0f1;
padding: 2px 5px;
border-radius: 4px;
}
ul {
list-style-type: none;
padding: 0;
}
li {
margin-bottom: 5px;
}
img {
max-width: 100%;
height: auto;
border: 1px solid #ddd;
border-radius: 4px;
padding: 5px;
}
</style>
<body>
<h1>Circle</h1>
<img src="circle.jpeg" height="200" alt="Circle">
<h2>Applications</h2>
<p><h3>Architecture and Construction:</h3> Circles are used in architectural
designs for elements such as arches, domes, and circular windows. They provide
structural stability and aesthetic appeal.</p>
<script>
// Function to calculate circle properties
function calculateCircleProperties(radius) {
// Calculate area of the circle
const area = Math.PI * radius * radius;
// Display results
document.getElementById("results").innerHTML = `
<h2>Results</h2>
<p>Area of the circle: ${circleProperties.area.toFixed(2)}</p>
<p>Perimeter (circumference) of the circle: $
{circleProperties.perimeter.toFixed(2)}</p>
<p>Surface area of the circle (assuming it's a sphere): $
{circleProperties.surfaceArea.toFixed(2)}</p>
`;
});
</script>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Contact Us</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #f4f4f4;
}
.container {
max-width: 600px;
margin: 20px auto;
padding: 20px;
background-color: #fff;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
h1 {
text-align: center;
color: #333;
}
form {
margin-top: 20px;
}
label {
display: block;
margin-bottom: 5px;
color: #555;
}
input[type="text"],
input[type="email"],
textarea {
width: 100%;
padding: 10px;
margin-bottom: 10px;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
}
input[type="submit"] {
width: 100%;
background-color: #007bff;
color: #fff;
border: none;
padding: 10px;
border-radius: 4px;
cursor: pointer;
}
input[type="submit"]:hover {
background-color: #0056b3;
}
</style>
</head>
<body>
<div class="container">
<h1>Contact Us</h1>
<form action="#" method="post">
<label for="name">Name</label>
<input type="text" id="name" name="name" required>
<label for="email">Email</label>
<input type="email" id="email" name="email" required>
<label for="message">Message</label>
<textarea id="message" name="message" rows="5"
required></textarea>