Step 1: Make a UI with html and CSS
HTML: use vs code source editor. firstly use boiler plate and add to CSS and JavaScript body and heading part.
then use div with class. use <input > tag - name-option, type-radio, id-anyname, value-a.
use 4 times in div.
Source Code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Quiz app</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="question">
<h1 class="qus">This the question</h1>
<div class="qu_box">
<input name="option" type="radio" value="a">
<label for="first">Testing 1</label>
</div>
<div class="qu_box">
<input name="option" type="radio" value="a">
<label for="first">Testing 2</label>
</div>
<div class="qu_box">
<input name="option" type="radio" value="a">
<label for="first">Testing 3</label>
</div>
<div class="qu_box">
<input name="option" type="radio" value="a">
<label for="first">Testing 4</label>
</div>
</div>
<script src="script.js"></script>
</body>
</html>
Now use CSS:
Comments
Post a Comment