Keyword Planner Tool
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: Arial, sans-serif;
font-size: 16px;
line-height: 1.5;
}
header {
background-color: #333;
color: #fff;
padding: 20px;
text-align: center;
}
main {
padding: 20px;
}
form {
display: flex;
flex-direction: column;
max-width: 500px;
margin: 0 auto;
}
.input-group {
margin-bottom: 20px;
}
label {
display: block;
margin-bottom: 5px;
}
input[type="text"] {
width: 100%;
padding: 10px;
border: 1px solid #ccc;
border-radius: 4px;
}
button[type="submit"] {
background-color: #333;
color: #fff;
border: none;
border-radius: 4px;
padding: 10px 20px;
cursor: pointer;
}
button[type="submit"]:hover {
background-color: #444;
}
const form = document.querySelector('form');
const resultContainer = document.querySelector('#result-container');
form.addEventListener('submit', (e) => {
e.preventDefault();
const keywords = document.querySelector('#keywords').value.trim();
const location = document.querySelector('#location').value.trim();
if (!keywords || !location) {
resultContainer.innerHTML = '
Please enter valid keywords and location.
';
return;
}
// Make API call to retrieve keyword suggestions based on the entered keywords and location
// Display the results in the resultContainer
});