Lorem And Epsum Method Js
Lorem And Epsum Method Js
Lorem And Epsum Method Js
html -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width,
initial-scale=1.0">
<title>Lorem Ipsum Generator</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header>
<h1>Lorem Ipsum Generator</h1>
</header>
<main>
<div class="options">
<div class="paragraphs">
<label for="paragraphs">
Paragraphs:
</label>
<input type="range"
id="paragraphs"
min="1" max="50"
value="1">
<span id="paragraphsValue">
1
</span>
</div>
<div class="words">
<label for="words">
Words per Paragraph:
</label>
<input type="range"
id="words"
min="1"
max="100"
value="10">
<span id="wordsValue">
10
</span>
</div>
<div class="tags">
<label for="tags">
Tag:
</label>
<select id="tags">
</select>
</div>
<div class="include">
<label for="include">
Include HTML:
</label>
<select id="include">
<option value="Yes">
Yes
</option>
<option value="No">
No
</option>
</select>
</div>
<button id="generate">
Generate Lorem Ipsum
</button>
</div>
<div class="output">
</html>/* Styles.css*/
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: Arial, sans-serif;
background-color: #f2f2f2;
}
header {
background-color: white;
color: green;
text-align: center;
padding: 20px 0;
box-shadow: 0px 4px 8px 0px
rgba(0, 0, 0, 0.2);
}
h1 {
font-size: 28px;
}
main {
max-width: 800px;
margin: 20px auto;
padding: 20px;
background-color: #fff;
box-shadow: 0px 4px 8px
rgba(0, 0, 0, 0.2);
border-radius: 10px;
}
.options {
margin-bottom: 20px;
}
.options label {
display: block;
font-weight: bold;
margin-bottom: 10px;
color: #333;
}
.options input[type="range"],
.options select,
.options input[type="number"] {
width: 100%;
padding: 17px;
margin-bottom: 20px;
border: 1px solid #ddd;
border-radius: 13px;
background-color: #f9f9f9;
box-shadow: 0px 2px 4px
rgba(0, 0, 0, 0.1);
color: #000;
}
.options select {
appearance: none;
}
.options button {
display: block;
width: 100%;
padding: 15px;
background-color: green;
color: #fff;
font-size: 20px;
font-weight: bold;
border: none;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s
ease;
}
.options button:hover {
background-color: rgb(20, 107, 20);
}
.output {
background-color: #ffffff;
padding: 30px;
border-radius: 10px;
border: 2px solid crimson;
min-height: 200px;
box-shadow: 5px 5px 15px 5px
rgba(0, 0, 0, 0.2);
color: #333;
}// Script.js
// Create Options UI
function createOptionsUI() {
const generateButton =
document.getElementById(
"generate"
);
generateButton.addEventListener(
"click",
generateLoremIpsum
);
}