xxxxxxxxxx
<!DOCTYPE html>
<html>
<body>
<form action="https://www.google.com/search" target="_blank">
<h2>This example searches Google</h2>
<input name="q"><br><br>
<button>Search</button>
</form>
</body>
</html>
xxxxxxxxxx
<!DOCTYPE html>
<html>
<head>
<title>Search Bar</title>
<style>
/* Add some style to the search bar */
form {
align-items: center;
border-radius: 5px;
}
input[type="text"] {
padding: 12px 20px;
margin: 8px 0;
border: none;
border-radius: 4px;
}
button {
width: 80px;
background-color: #4CAF50;
color: white;
padding: 14px 20px;
margin: 8px 0;
border: none;
border-radius: 4px;
cursor: pointer;
}
button:hover {
background-color: #45a049;
}
</style>
</head>
<body>
<!-- Create the search bar -->
<form action="/search" method="get">
<input type="text" name="query" placeholder="Search...">
<button type="submit">Go</button>
</form>
</body>
</html>
xxxxxxxxxx
<form action="/search" method="get">
<input type="text" name="q" placeholder="Enter your search query">
<input type="submit" value="Search">
</form>