Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 7 additions & 12 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@

```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 Maker</title>
</head>

Expand All @@ -13,8 +14,8 @@
<h2>Create QR Code</h2>
<p>Type any text, link, or contact information to create a QR code.</p>

<label>Input Text or URL:</label>
<input type="text" id="qrInput" placeholder="Paste link or text here..." />
<label for="qrInput">Input Text or URL:</label>
<input type="text" id="qrInput" placeholder="Paste link or text here..." required />

<button id="createBtn">Create QR</button>

Expand All @@ -37,6 +38,7 @@ <h2>Create QR Code</h2>

if (value === "") {
alert("Please enter some text or URL");
document.getElementById("qrInput").focus();
return;
}

Expand All @@ -51,12 +53,5 @@ <h2>Create QR Code</h2>
</script>

</body>
</html>```

**Changes:**

1. **Added `required` attribute**: Ensures that the user enters some input before clicking the Generate button.
2. **Added `label` element**: Improves accessibility by providing a clear label for the input field.
3. **Added `meta` tags**: Includes the viewport meta tag for responsive design and the character encoding meta tag for proper character rendering.

Please note that these changes are just suggestions, and you may need to adapt them to your specific requirements.
</html>
```