FSWD-8
FSWD-8
AIM:
ALGORITHM:
Step 2: Choose a Technology Stack Select a web development framework and languages.
Step 3: Create Project Structure Establish directories for HTML, CSS, JavaScript files, and assets.
Step 4: Code HTML Structure Develop HTML templates for each webpage (index, about, resume,
projects, contact).
Step 5: Implement CSS Styling Style HTML elements using CSS for a visually appealing design.
Step 6: Add JavaScript Functionality Integrate JavaScript for interactive features and dynamic
content loading.
Step 7: Test and Debug Conduct thorough testing on different browsers and devices.
PROGRAM:
HTML:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Online Survey</title>
<link rel="stylesheet" href="styles.css">
CSS:
body {
font-family: Book 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial,
sans-serif;
background-image: url('img4.jpg');
background-color: #f0f0f0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
}
.container {
background-color: #fff;
padding: 20px;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
width: 500px;
text-align: center;
}
h1 {
margin-bottom: 20px;
color: #333;
JAVASCRIPT:
const questions = [
"How often do you use technology in your daily routine?",
"What device do you primarily use for accessing the internet?",
"How comfortable are you with using new technology?",
"Which of the following technologies are you most interested in learning?",
"What is your preferred operating system?",
"How often do you update your software or devices?",
"What concerns you most about technology?",
"How do you primarily use technology for educational purposes?",
"Which tech-related social media platforms do you use the most?",
"How do you feel about the integration of AI into daily life?"
];
questionDiv.appendChild(checkbox);
questionDiv.appendChild(label);
questionContainer.appendChild(questionDiv);
});
function proceedToSurvey() {
const selectedQuestions = document.querySelectorAll('input[name="question"]:checked');
if (selectedQuestions.length !== 5) {
alert("Please select exactly 5 questions.");
return;
}
options[index].forEach(option => {
const optionLabel = document.createElement("label");
const radio = document.createElement("input");
radio.type = "radio";
radio.name = option${index};
radio.value = option;
optionLabel.appendChild(radio);
optionLabel.appendChild(document.createTextNode(option));
optionsDiv.appendChild(optionLabel);
optionsDiv.appendChild(document.createElement("br"));
});
questionDiv.appendChild(optionsDiv);
questionContainer.appendChild(questionDiv);
});
function submitSurvey() {
const selectedAnswers = [];
const selectedQuestions = document.querySelectorAll('.survey-question');
OUTPUT:
RESULT: