<!DOCTYPE html>
<html>
<head>
<title>Text to Qr</title>
<link rel=”stylesheet” href=”styles.css”>
<style>
.Img-center{
display: flex;
justify-content: center;
aling-items: center;
margin-top: 10px;
}
.btn{
background-color:rgb(1, 118, 211);
padding:8px 7px;
color: white;
border-radius:5px;
border:none;
}
.input-center{
padding: 10px;
font-size:18px
border-radius:50px;
}
.foot{
position:absolute;
bottom:0;
align-items: center;
}
</style>
</head>
<body>
<div class=”Img-center”>
<h1> Text to Qr Code Generator</h2>
</div>
<div class=”Img-center”>
<img src=” “>
</div>
<div class=”Img-center”>
<input class=”input-center” type=”text”>
</div>
<div class=”Img-center”>
<button class=”btn”>Generate</button>
</div>
<footer>
<p class=”foot” > Copyright © 2023 Text to Qr . All rights reserved. </P>
</footer>
<script>
const image = document.querySelector(“img”),
input = document.querySelector(“input”),
button = document.querySelector(“button”),
api = `https://api.qrserver.com/v1/`,
api2 = `create-qr-code/?size=250×150&data=`;
button.addEventListener(“click”,() => {
image.src = `${api}${api2}${input.value}`;
});
</script>
</body>
</html>