Skip to main content

QR Code Generator Using HTML, CSS & JS

 

#qr #qrcode #generator #qrcodegenerator #html #css #foryou #world #happy # website #webdesign #webdeveloper #how to #howto #trending #viral #srilanka #youtube #tiktok #blog  #howtocreate #Javascript #image #imageuploader

Learn how to create your very own QR code generator using HTML, CSS, and JavaScript in this step-by-step tutorial. QR codes are everywhere, and understanding how to generate them dynamically on your website can be incredibly useful. We'll walk you through the entire process, from setting up the HTML structure to styling it with CSS and adding the functionality with JavaScript. By the end of this video, you'll have a fully functioning QR code generator that you can integrate into your website or web application. Let's dive in and start generating QR codes with code! Learn how to create your very own QR code generator using HTML, CSS, and JavaScript in this step-by-step tutorial. QR codes are everywhere, and understanding how to generate them dynamically on your website can be incredibly useful. We'll walk you through the entire process, from setting up the HTML structure to styling it with CSS and adding the functionality with JavaScript. By the end of this video, you'll have a fully functioning QR code generator that you can integrate into your website or web application. Let's dive in and start generating QR codes with code!



1.Create a New Folder

2.Open the Folder in Vs Code 

3.Create index.html and style.css Files 

4.Begin Coding  


index.html 

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>QR Code Generator</title>
    <link rel="stylesheet" href="style.css">
</head>
<body>
 <div class="container">
    <p>Enter The URL OR Text</p>
    <input type="text" placeholder="Text OR uRL" id="qrText">
    <div id="imageBox">
        <img src="" id="qrImage">
    </div>
    <button onclick="generator()">Generate Qr</button>
 </div>
 <script>
    let imageBox = document.getElementById("imageBox");
    let qrImage = document.getElementById("qrImage");
    let qrText = document.getElementById("qrText");

    function generator() {
        qrImage.src =
        "https://api.qrserver.com/v1/create-qr-code/?size=150x150&data="
        + qrText.value;
    }
 </script>
</body>
</html>


style.css


*{
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
}
body{
    background-color: #04364a;
}
.container{
    top: 50%;
    left: 50%;
    background-color: #fff;
    border-radius: 10px;
    width: 400px;
    padding: 25px 30px;
    position: absolute;
    transform: translate(-50%,-50%);
}
.container p{
    font-size: 30px;
    font-style: bold;
    margin-bottom: 10px;
    text-align: center;
}
.container input{
    padding: 10px;
    width: 100%;
    height: 50px;
    text-align: center;
    outline: 0;
    border: 2px solid black;
    margin: 10px 0 20px;
    border-radius: 5px;
    font-style: italic;
}
.container button{
    font-weight: 500;
    margin: 20px 0;
    cursor: pointer;
    width: 100%;
    height: 50px;
    background-color: black;
    color: #fff;
    border: 0;
    outline: 0;
    border-radius: 5px;
    box-shadow: 0 10px 10px rgba(0,0,0,0.5);
}
#imageBox img{
    width: 100%;
    padding: 10px;
}




Comments

Popular posts from this blog

How To Create a Sign Up Form Using HTML & CSS

    In this tutorial, we'll guide you through the process of creating a standard sign-up form using HTML and CSS. It's a fundamental skill for anyone interested in web development or design. This tutorial is suitable for beginners and provides a solid foundation for understanding how to create a sign-up form. If you're interested in web development or web design, this is a crucial skill to master. If you find this video helpful, please consider liking and subscribing for more web development tutorials. Let's start building your sign-up form together!  1.Create a New Folder 2.Open the Folder in Vs Code  3.Create index.html and style.css Files  4.Create Image Folder and download  Background picture to Image folder 5.Begin Coding  index.html  <! DOCTYPE html > < html lang = "en" > < head >     < meta charset = "UTF-8" >     < meta name = "viewport" content = "width=device-width, initial-scale=1.0" >

How to Create Solar System Using HTML & CSS

  🌟 Explore the Universe: Building a Solar System with HTML and CSS! 🌟 Welcome to another mind-blowing adventure on @Coding With Nexus ! 🚀 Join us as we embark on an interstellar journey to create our very own solar system using nothing but HTML and CSS. 🌌 First Create a New Folder, Then 1.Open the folder in Vs Code 2.Create index.html and style.css Files 3.Begin Coding  index.html <! DOCTYPE html > < html lang = "en" > < head >     < meta charset = "UTF-8" >     < meta name = "viewport" content = "width=device-width, initial-scale=1.0" >     < link rel = "stylesheet" href = "style.css" >     < title > Solar System </ title > </ head > < body >     < div class = "container" >         < div class = "sun" ></ div >         < div class = "earth" >             < div class = "moon" ></

How to Create Animate Mic Logo

    Embark on a design and coding adventure with our tutorial on creating and animating a microphone logo using HTML and CSS. In this concise yet comprehensive guide, we'll navigate logo design principles, emphasizing simplicity and visual balance. Seamlessly transitioning to animation, we'll bring the mic logo to life, making it dynamic and engaging. What sets this tutorial apart is its accessibility—no complex software, just the power of code.🎙️✨ #logoanimation #designtutorial #webdevelopment Don't forget to like, share, and subscribe for more web development tutorials and tips. If you have any questions or need further assistance, feel free to leave a comment, and we'll be happy to help you out. Happy coding! Like Us On Facebook:    / codingwithnexusofficial   Follow Us On Instagram:    / coding_with_nexus   Follow Us On TikTok:    / coding.with.nexus  index.html <! DOCTYPE html > < html lang = "en" > < head >     < meta