
Animal & Birds Crossword Puzzle
Across
- What waterbird is known for its distinctive V-shaped flying formation during migration? (5 letters)
- Small, furry mammal known for its long ears and powerful back legs (4 letters)
- What is the other name for the puma, a large, solitary cat native to the Americas (4 letters)
- What is the name of the process by which fish lay and fertilize eggs outside of the body, often in nests or in gravel beds (4 letters)
- What primate species is the closest living relative to humans (3 letters)
Down
- Large, gray mammal known for its intelligence and memory (8 letters)
Below is a very basic code example of how to create a Crossword Puzzle using basic knowledge of Html, CSS and JavaScript.
HTML Crossword Template Code using Table Elements
<h2>Animal & Birds Crossword Puzzle</h2>
<table>
<tr>
<td class="dark"></td>
<td class="dark"></td>
<td id="11"><input class="inpt" type="text"></input></td>
<td id="12"><input class="inpt" type="text"></input></td>
<td id="13"><input class="inpt" type="text"></input></td>
<td id="14"><input class="inpt" type="text"></input></td>
<td id="15"><input class="inpt" type="text"></input></td>
<td class="dark"></td>
</tr>
<tr>
<td class="dark"></td>
<td class="dark"></td>
<td class="dark"></td>
<td ><input class="inpt" type="text"></input></td>
<td class="dark"></td>
<td class="dark"></td>
<td class="dark"></td>
<td class="dark"></td>
</tr>
<tr>
<td ><input class="inpt" type="text"></input></td>
<td ><input class="inpt" type="text"></input></td>
<td ><input class="inpt" type="text"></input></td>
<td ><input class="inpt" type="text"></input></td>
<td class="dark"></td>
<td class="dark"></td>
<td class="dark"></td>
<td class="dark"></td>
</tr>
<tr>
<td class="dark"></td>
<td class="dark"></td>
<td class="dark"></td>
<td ><input class="inpt" type="text"></input></td>
<td ><input class="inpt" type="text"></input></td>
<td ><input class="inpt" type="text"></input></td>
<td ><input class="inpt" type="text"></input></td>
<td class="dark"></td>
</tr>
<tr>
<td ><input class="inpt" type="text"></input></td>
<td ><input class="inpt" type="text"></input></td>
<td ><input class="inpt" type="text"></input></td>
<td ><input class="inpt" type="text"></input></td>
<td class="dark"></td>
<td class="dark"></td>
<td class="dark"></td>
<td class="dark"></td>
</tr>
<tr>
<td class="dark"></td>
<td class="dark"></td>
<td class="dark"></td>
<td ><input class="inpt" type="text"></input></td>
<td ><input class="inpt" type="text"></input></td>
<td ><input class="inpt" type="text"></input></td>
<td class="dark"></td>
<td class="dark"></td>
</tr>
<tr>
<td class="dark"></td>
<td class="dark"></td>
<td class="dark"></td>
<td ><input class="inpt" type="text"></input></td>
<td class="dark"></td>
<td class="dark"></td>
<td class="dark"></td>
<td class="dark"></td>
</tr>
<tr>
<td class="dark"></td>
<td class="dark"></td>
<td class="dark"></td>
<td ><input class="inpt" type="text"></input></td>
<td class="dark"></td>
<td class="dark"></td>
<td class="dark"></td>
<td class="dark"></td>
</tr>
</table>
<h3>Across</h3>
<ol>
<li>What waterbird is known for its distinctive V-shaped flying formation during migration? (5 letters)</li>
<li>Small, furry mammal known for its long ears and powerful back legs (4 letters)</li>
<li>What is the other name for the puma, a large, solitary cat native to the Americas (4 letters)</li>
<li>What is the name of the process by which fish lay and fertilize eggs outside of the body, often in nests or in gravel beds (4 letters)</li>
<li>What primate species is the closest living relative to humans (3 letters)</li>
</ol>
<br>
<h3>Down</h3>
<ol>
<li>Large, gray mammal known for its intelligence and memory (8 letters)</li>
</ol>
CSS for Designing the Crossword
table {
text-align: center;
padding:10px;
border:1px dashed #888;
}
td {
width: 30px;
height: 30px;
}
.dark {
background:#333;
}
.inpt {
width: 30px;
height: 30px;
font-size:24px;
text-align:center;
border: 2px solid #222;
}
JavaScript Code to validate
You can try may ways, here is a simple example to validate the first across question. If you get the word correctly the color turns to blue, else stays red as an indicator that the answer is wrong.
var inputs = document.querySelectorAll("input.inpt");
for (var i = 0; i < inputs.length; i++) {
inputs[i].addEventListener("input", function() {
var allValues = "";
for (var j = 11; j <= 15; j++) {
allValues += document.getElementById("" + j).getElementsByTagName("input")[0].value;
}
if (allValues === "GEESE") {
for (var k = 11; k <= 15; k++) {
document.getElementById("" + k).getElementsByTagName("input")[0].style.color = "green";
}
} else {
for (var k = 11; k <= 15; k++) {
document.getElementById("" + k).getElementsByTagName("input")[0].style.color = "red";
}
}
});
}
You can find the code on GitHub: https://github.com/bladerunr2049/crossword/blob/main/README.md
Have Questions? Post them here!
- remove div vertical scroll
- Create HTML button that looks like a href hyperlink
- Comprehensive 256 Ascii code table with Html Hex IBM Microsoft Key
- HTML5 HELLO WORLD Example
- Get HTML table td, tr or th inner content value with id or name attribute
- Adding Sub Headings to Bootstrap Header tags
- What is the doctype for HTML5?
- Chessboard with pieces using pure HTML and CSS
- Hyperlink in html (anchor tag) without a underline
- W3 : character data is not allowed here html validation error
- Fibonacci series from 1 to 500 table
- 9 Border to DIV Element in HTML Examples
- How to add multiple spaces between html page text
- How to turn off autocomplete in input fields in HTML Form
- Default speed of Marquee tag : SCROLLAMOUNT
- How to word wrap in HTML
- Force convert HTML text input to upper case
- HTML5 CSS3 Color Codes List
- How to remove old 404 pages ulrs from Google crawler
- reCaptcha Verification expired. Check the checkbox again
- All directional arrows codes for HTML
- Align html element at the center of page vertically and horizontally
- How to make a div tag clickable
- Remove Html head and body tags from ckeditor source
- Auto Refresh Webpage after every x Second or Minute using Meta Tag?
- Linux Remove or Delete Files and Directories using Terminal Commands - Linux
- reCAPTCHA Implementation Tutorial - CSS
- FCM Messages Test Notification!!!! - Microsoft Teams, Google Hangouts push alert - News
- Find Duplicate Files using Mac Terminal Command - MacOS
- Git: Step-by-Step - How to Push Local Brach to GitHub - Git
- Step by Step: Spring Boot + JPA + MySQL + Redis as Cache - Java
- How to List all Packages installed using pip [Python] - Python
- Install Java Runtime Environment (Oracle or open JRE) on Ubuntu - Linux