Trinadh Inetnship 2
Trinadh Inetnship 2
BACHELOR OF TECHNOLOGY
in
(DATA SCIENCE)
By
NIMMALAPUDI TRINADH CHOWDARY 21751A3240
(DATA SCIENCE)
(2024 - 2025)
SREENIVASA INSTITUTE OF TECHNOLOGY AND
MANAGEMENT STUDIES,CHITTOOR,517127,A.P.
(Autonomous)
(Approved by AICTE, New Delhi & Affiliated to JNTUA, Ananthapuramu)
(DATA SCIENCE)
CERTIFICATE
This is to certify that the internship report “STUDY OF FRONTEND WEB
DEVELOPMENT” is a genuine work of
1.1 INTRODUCTION 1
2 PROJECTION DESCRIPTION 8
3.2 CONCLUSION 27
REFERENCES 28
CHAPTER 1
• Internship programs
• Certifications
• IT solutions
• Partnerships
1
1.2 BACK GROUND
Web development is the process of creating, building, and maintaining websites and
web applications. It's important for businesses because it helps them:
• Expand their reach: Web applications can be accessed from anywhere with an
internet connection.
• Increase sales: A website makes it easier for customers to find a business online.
• Provide a good user experience: Well-designed web applications can increase
customer satisfaction and brand loyalty.
• Save costs: Web applications can automate processes, reducing the need for manual
work.
• Maintain brand identity: A website can help a business maintain its brand identity.
Web development can involve a variety of tasks, including: web design, web programming,
and database management.
The basic tools used in web development include: HTML (Hypertext Markup Language),
CSS (Cascading Style Sheets), and JavaScript.
1.3 PURPOSE
The purpose of web development is to create, build, and maintain websites that are
efficient and run smoothly on a browser. Web development is a subset of computer
programming that involves a number of key aspects, including:
• Web design: Determines the design and functionality of a website to enhance the
user experience
• Database management: Stores and handles databases accurately and securely
• Web programming: Includes frontend and backend development, which focus on
the user-facing and server-side functionality of a website
• Maintenance and updates: Fixes bugs, updates features, and ensures security
• User experience (UX) design: Envisions and develops how users will interact with
a website
• Security: Protects against security threats and vulnerabilities that hackers could
exploit
Web development can help businesses improve their brand identity, reach, visibility,
customer engagement, and more.
2
1.4 SCOPE
The scope of web development is expected to grow due to the increasing demand
for online services and digital experiences. Web developers are in high demand across
many industries, and the job prospects for mid-level and senior web developers are very
strong.
The scope of web development encompasses all related development activities,
such as client-side scripting, server-side scripting, server and network security settings, e-
commerce development, and content management system (CMS) development, in addition
to web markup and code.
Here are some reasons why web development has a promising scope:
• Growing demand: With more people working, learning, and meeting online,
businesses are realizing the need to be online too.
• Many different jobs: Web developers are needed in many areas, including online
shops, hospitals, schools, banks, and more.
• Creative and fun: Web development allows you to express yourself creatively.
• Work flexibility: You can work as a freelancer, part-time, full-time, or from home.
• Transferable skills: Web developers gain skills that are ideal for other disciplines,
such as mobile development.
Some of the future trends in web development include:
• Responsive and adaptive designs
• Progressive Web Apps (PWAs)
• AI integration
• Augmented Reality (AR) and Virtual Reality (VR)
• Voice search optimization
• E-commerce evolution
• Blockchain integration
• Sustainability and green websites
3
1.5 OBJECTIVE OF THE PROJECT:
1.5.1 TASK-1: Interactive Quiz Game :
1.5.1.1Objective:
The project aims to create an interactive quiz game that is both educational
and engaging, allowing users to test their knowledge through multiple-choice questions
and receive immediate feedback on their performance. The game is built using HTML for
layout, CSS for styling, and JavaScript for functionality.
1.5.1.2 Key Elements of the Project:
1.5.1.2.a HTML for Structure:
o HTML forms the foundation of the quiz. It includes the essential elements
for displaying questions, multiple-choice answers, a timer, and score
indicators.
o The HTML structure may consist of a container for the quiz, a display for
each question and its answer choices, and areas for the timer and score.
1.5.1.2.b CSS for Styling:
o CSS is used to style the quiz interface to make it visually appealing and user-
friendly.
o Styles include color schemes for correct/incorrect answers, animations or
transitions, and an intuitive layout that guides users smoothly through the
quiz.
1.5.1.2.c JavaScript for Interactivity:
o JavaScript brings the quiz to life by adding interactivity. It dynamically
displays questions, manages answer selection, and updates the score and
timer.
o JavaScript functions handle the flow of the quiz, checking answers and
storing the user’s score.
1.5.1.2.d Designing Multiple-Choice Questions:
o Each question has multiple answer choices, only one of which is correct.
Users select their answer by clicking, which triggers immediate feedback.
o This design offers a clear, easy-to-understand format for users.
1.5.1.2.e Including a Timer and Score Tracking:
o A timer adds a challenge to the quiz by setting a limit on how long users
4
have to complete it or answer each question.
o Score tracking updates in real-time as the user answers each question. The
final score is calculated based on the number of correct answers.
1.5.1.2.f Feedback on Correct and Incorrect Answers:
o After each answer selection, users receive instant feedback indicating
whether their answer was correct or incorrect.
o Feedback can be visual (e.g., color changes for correct/incorrect answers)
and/or textual, helping users learn from their mistakes.
1.5.1.2.g Displaying Final Score:
o At the end of the quiz, the final score is displayed along with feedback based
on the user’s performance.
o This final screen provides an overview of how the user performed,
encouraging them to replay or improve.
Conclusion:
This interactive quiz game leverages HTML, CSS, and JavaScript to create an
engaging, educational experience. By combining real-time feedback, a timed challenge,
and score tracking, the quiz encourages users to actively participate and improve their
knowledge. The project demonstrates the powerful combination of front-end technologies
to create fun, dynamic applications that are both informative and interactive.
5
1.2.2 TASK-2 E-Commerce Product Page:
Objective:
The objective of this project is to design a functional and visually appealing E-
Commerce product page that provides users with essential product information, allows for
a seamless purchasing process, and enhances user interaction with responsive design and
basic shopping cart functionality.
Key Elements of the Project:
1. Using HTML and CSS for Structure and Styling:
o HTML forms the backbone of the product page, structuring key elements
such as product details, images, pricing, and the “Buy Now” button.
o CSS is utilized to style these elements to create a clean, professional, and
user-friendly design, ensuring a visually engaging layout.
2. Displaying Product Details:
o The page includes a detailed product description, image, price, and the “Buy
Now” button.
o These details give users a comprehensive view of the product, increasing
their confidence in making a purchase.
3. Responsive Design for Various Screen Sizes:
o CSS media queries are implemented to ensure the product page adjusts
smoothly across different screen sizes (desktops, tablets, and mobile
devices).
o A responsive layout enhances the user experience by making the page
accessible and easy to navigate, regardless of device.
4. Adding Hover Effects for Product Image:
o CSS hover effects are applied to the product image, adding a subtle zoom
or scale-up effect when users hover over it.
o This interaction feature provides users with a closer look at the product and
makes the page feel more dynamic and engaging.
5. Implementing a Simple Shopping Cart with JavaScript:
o JavaScript adds interactivity to the page by managing a basic shopping cart
function.
o When the user clicks the “Buy Now” button, the selected product is added
6
to the cart, and a message or alert notifies the user of the addition.
o The cart functionality allows users to track products they intend to purchase,
providing a practical e-commerce experience.
Conclusion:
This E-Commerce product page project combines HTML, CSS, and JavaScript to
create an interactive and responsive shopping interface. The page layout provides users
with detailed product information, while responsive design makes it accessible on various
devices. By incorporating hover effects and a simple JavaScript shopping cart, the project
demonstrates essential front-end techniques for developing functional, user-centric e-
commerce applications. This page provides a foundational template for an online store,
enhancing both user experience and engagement.
7
CHAPTER-2
PROJECT DESCRIPTION
2. Quiz Elements:
• result: Hidden section that shows the final score and has a restart button
after the quiz ends.
3. Result Section: This section is hidden during gameplay and shows the final
score at the end.
CODE:
<!DOCTYPE html>
<html lang="en">
8
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Quiz Game</title>
<link rel="stylesheet" href="styles4.css">
</head>
<body>
<div class="container">
<div id="quiz">
<div id="question-container">
<div id="question">Question Text</div>
<div id="answer-buttons" class="btn-grid">
<button class="btn">Answer 1</button>
<button class="btn">Answer 2</button>
<button class="btn">Answer 3</button>
<button class="btn">Answer 4</button>
</div>
</div>
<div class="controls">
<div id="timer">Time: 60</div>
<div id="score">Score: 0</div>
<button id="start-btn" class="start-btn btn">Start</button>
</div>
</div>
<div id="result" class="hide">
<h2>Final Score</h2>
<p id="final-score"></p>
<button id="restart-btn" class="start-btn btn">Restart</button>
</div>
</div>
<script src="script4.js"></script>
</body>
</html>
9
2.1.2 CSS (Styling):
1. General Layout:
• The body has a flexbox layout, centering the quiz on the page.
2. Button Styling:
3. Hiding Elements: The .hide class is used to hide elements like the result
section.
CODE:
body {
font-family: 'Arial', sans-serif;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #f4f4f4;
margin: 0;
}
.container {
background: white;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
width: 400px;
text-align: center;
padding: 20px;
}
.btn {
cursor: pointer;
background: #007bff;
color: white;
10
border: none;
border-radius: 5px;
padding: 10px 20px;
margin: 5px 0;
font-size: 16px;
width: 100%;
}
.btn:hover {
background: #0056b3;
}
.hide {
display: none;
}
#question {
margin-bottom: 20px;
font-size: 20px;
}
#answer-buttons {
display: flex;
flex-direction: column;
}
.controls {
display: flex;
justify-content: space-between;
margin-top: 20px;
}
2.1.3 JavaScript (Functionality):
1. Game Variables:
• Time Left: Stores the time left for the quiz, starting from 60 seconds.
11
2. Question Data:
3. Event Listeners:
4. Game Functions:
• Start Game(): Initializes the game by hiding the start button, resetting
the timer and score, shuffling the questions, and starting the timer.
• Set Next Question(): Prepares and displays the next question in the
shuffled list.
• Reset State(): Clears previous answer buttons before displaying the new
set of answers.
• End Game(): Stops the timer and displays the final score.
• Restart Game(): Resets the game by hiding the result section and
showing the start button again.
5. Timer: The timer counts down from 60 seconds. If time runs out, the game
ends.
CODE:
12
const resultElement = document.getElementById('result')
const finalScoreElement = document.getElementById('final-score')
let shuffledQuestions, currentQuestionIndex
let score = 0
let timeLeft = 60
let timerInterval
const questions = [
{
question: 'What is 2 + 2?',
answers: [
{ text: '4', correct: true },
{ text: '5', correct: false },
{ text: '3', correct: false },
{ text: '6', correct: false }
]
},
{
question: 'Which is the Fastest trainin india?',
answers: [
{ text: 'Gatimaan Express', correct: false },
{ text: 'Rajdhani Express', correct: false },
{ text: 'New Delhi-Bhopal Shatabdi Express', correct: false },
{ text: 'Vande Bharat Express', correct: true }
]
},
{
question: 'When assem became the part of india?',
answers: [
{ text: '1947', correct: false},
{ text: '1950', correct: true },
{ text: '1983', correct: false },
{ text: '1976', correct: false }
]
},
{
13
question: 'What is the capital of France?',
answers: [
{ text: 'London', correct: false },
{ text: 'Paris', correct: true },
{ text: 'Berlin', correct: false },
{ text: 'Madrid', correct: false }
]
},
{
question: 'Who wrote "To Kill a Mockingbird"?',
answers: [
{ text: 'Harper Lee', correct: true },
{ text: 'Mark Twain', correct: false },
{ text: 'Ernest Hemingway', correct: false },
{ text: 'F. Scott Fitzgerald', correct: false }
]
},
{
question: 'which state is called as "Rice Bowl of India"?',
answers: [
{ text: 'West Bengal', correct: false },
{ text: 'Uttar Pradesh', correct: false },
{ text: 'Andhra Pradesh', correct: true },
{ text: 'Punjab', correct: false }
]
},
{
question: 'Which is the Rainless place in the world?',
answers: [
{ text: 'chile', correct: true },
{ text: 'Dry Valleyes', correct: false },
{ text: 'Dubai', correct: false },
{ text: 'Egypt', correct: false }
]
},
14
{
question: 'which city is called "The city of Light"?',
answers: [
{ text: 'Paries', correct: true },
{ text: 'Varanasi', correct: false },
{ text: 'New York', correct: false },
{ text: 'None of this', correct: false }
]
},
{
question: '"Smallest city in the world"?',
answers: [
{ text: 'Ngerulmud', correct: false },
{ text: 'Hum', correct: false },
{ text: 'Adamstown', correct: false },
{ text: 'Vatican', correct: true }
]
},
{
question: 'What is the rank of India in Railway?',
answers: [
{ text: '4', correct: true },
{ text: '5', correct: false },
{ text: '3', correct: false },
{ text: '6', correct: false }
]
},
]
startButton.addEventListener('click', startGame)
restartButton.addEventListener('click', restartGame)
function startGame() {
startButton.classList.add('hide')
shuffledQuestions = questions.sort(() => Math.random() - .5)
currentQuestionIndex = 0
questionContainerElement.classList.remove('hide')
15
score = 0
scoreElement.innerText = 'Score: ' + score
timeLeft = 60
timerElement.innerText = 'Time: ' + timeLeft
timerInterval = setInterval(() => {
timeLeft--
timerElement.innerText = 'Time: ' + timeLeft
if (timeLeft <= 0) {
clearInterval(timerInterval)
endGame()
}
}, 1000)
setNextQuestion()
}
function setNextQuestion() {
resetState()
showQuestion(shuffledQuestions[currentQuestionIndex])
}
function showQuestion(question) {
questionElement.innerText = question.question
question.answers.forEach(answer => {
const button = document.createElement('button')
button.innerText = answer.text
button.classList.add('btn')
if (answer.correct) {
button.dataset.correct = answer.correct
}
button.addEventListener('click', selectAnswer)
answerButtonsElement.appendChild(button)
})
}
function resetState() {
while (answerButtonsElement.firstChild) {
answerButtonsElement.removeChild(answerButtonsElement.firstChild)
}
16
}
function selectAnswer(e) {
const selectedButton = e.target
const correct = selectedButton.dataset.correct
if (correct) {
score++
scoreElement.innerText = 'Score: ' + score
}
if (shuffledQuestions.length > currentQuestionIndex + 1) {
currentQuestionIndex++
setNextQuestion()
} else {
clearInterval(timerInterval)
endGame()
}
}
function endGame() {
questionContainerElement.classList.add('hide')
resultElement.classList.remove('hide')
finalScoreElement.innerText = 'You scored ' + score + ' out of ' + questions.length
}
function restartGame() {
resultElement.classList.add('hide')
startButton.classList.remove('hide')
}
Game Flow:
2. Each question is displayed with four answer options. Selecting the correct
answer increases the score.
3. The quiz runs until all questions are answered or the timer reaches 0.
4. At the end, the final score is shown, and the player can restart the game by
clicking the Restart button
17
2.1.4 Output:
18
2.2 TASK-2 E-Commerce Product Page:
• Header: Contains a navigation bar with links to other sections (Home, About,
Projects, Contact) and a welcoming title.
Main Content:
19
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Product Page</title>
<link rel="stylesheet" href="e-commerce.css">
</head>
<body>
<div class="container">
<div class="product">
<div class="product-image">
<img src="C:\Users\poorn\OneDrive\Pictures\Screenshots\Screenshot 2024-10-
27 210947.png" alt="Product Image" class="img-hover">
</div>
<div class="product-details">
<B><h1 class="product-title">LED TV</h1></B>
<p class="product-description">Television (TV) is a telecommunication medium
for transmitting moving images and sound.LED TVs are preferred for their energy
efficiency, slimmer design, and enhanced picture quality.LEDs consume less power than
liquid crystal displays.</p>
<span class="product-price">$999.99</span>
<button class="buy-button" onclick="addToCart()">Buy Now</button>
</div>
</div>
</div>
<script src="scr.js"></script>
</body>
</html>
2.2.2 CSS Styling:
• Universal Selector (*): Applies the box-sizing: border-box rule to all elements,
making layout calculations more predictable.
• Body Styling: Sets the font, background color, and overall padding.
• Container Styles: Creates a container centered on the page with a maximum width,
a white background, rounded corners, and a box shadow.
• Product Styling: Contains a product display layout with centered alignment and
hover effects on the images for a smooth enlargement.
• Button Styling: Styles a buy-button class with colors, rounded corners, and hover
effects.
• Media Query: Ensures that on smaller screens (600px and below), the product
items stack vertically for better mobile responsiveness.
20
CODE:
*{
box-sizing: border-box;
}
body {
font-family: Arial, sans-serif;
background-color: #f8f8f8;
margin: 0;
padding: 20px;
}
.container {
max-width: 800px;
margin: auto;
background: white;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
overflow: hidden;
}
.product {
display: flex;
flex-direction: column;
align-items: center;
}
.product-image {
width: 100%;
text-align: center;
}
.product-image img {
max-width: 100%;
border-radius: 8px;
transition: transform 0.3s;
}
.product-image img.img-hover:hover {
transform: scale(1.05);
}
.product-details {
padding: 20px;
text-align: center;
}
.product-title {
font-size: 24px;
margin: 0;
}
21
.product-description {
margin: 10px 0;
color: #555;
}
.product-price {
font-size: 20px;
color: #333;
font-weight: bold;
}
.buy-button {
padding: 10px 20px;
background-color: #28a745;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s;
}
.buy-button:hover {
background-color: #218838;
}
@media (max-width: 600px) {
.product {
flex-direction: column;
padding: 10px;
}
}
2.2.3 JavaScript Functionality
• Cart Array: Initializes an empty cart array to store products added to it.
• AddToCart Function:
✓ Creates a product object with properties title, price, and image.
✓ Adds the product to the cart array and displays an alert to confirm the action.
✓ Logs the updated cart array to the console for debugging purposes.
CODE:
let cart = [];
function addToCart() {
const product = {
title: "Product Title",
price: 29.99,
image: "https://via.placeholder.com/300"
};
22
cart.push(product);
alert(`${product.title} has been added to your cart!`);
console.log(cart);
}
Potential Improvements
• Remove Duplicates: Remove the duplicate <title> and stylesheet link in the
<head> for optimization.
• Image Paths: Use relative paths for images to ensure they display on a live server.
• Dynamic Cart Display: Display the contents of the cart on the webpage rather than
only in the console.
23
Fig(2.2.4.b) ALERT MESSAGE
24
Fig(2.2.4.d)ADDING NO. OF PRODUCT
25
CHAPTER 3
The provided code is a foundational structure for an e-commerce product page. It includes
a clean HTML layout for displaying product details (such as title, image, price, and a “Buy
Now” button), styled with CSS for a visually appealing and responsive design. Key CSS
features include hover effects on the product image for interactivity and media queries to
ensure a seamless experience across various screen sizes. Additionally, a JavaScript
function enables a basic shopping cart functionality, where products can be added to a cart,
stored in an array, and logged in the console for confirmation.
26
3.2 Conclusion:
This code effectively sets up a structured and styled product page for an e-commerce
website. The CSS styling and JavaScript functionality create a user-friendly experience,
with hover effects and responsive design making the page visually engaging and easy to
use on different devices. Suggestions for improvement include optimizing code by
removing duplicates, improving image paths, and adding a dynamic cart display on the
webpage. These enhancements could further elevate the page’s functionality, accessibility,
and SEO.
This interactive quiz game effectively combines web development principles to provide an
engaging and educational experience. By using HTML, CSS, and JavaScript, it creates a
functional and visually appealing quiz platform. Key features such as score tracking, a
countdown timer, and real-time feedback enhance user interaction and learning outcomes.
Potential enhancements could include expanding the question set, adding sound effects for
correct/incorrect answers, and implementing a more sophisticated user interface. Overall,
this project showcases fundamental web development skills and can serve as a foundation
for more complex interactive applications.
27
REFERENCES
28