Search
 
SCRIPT & CODE EXAMPLE
 

HTML

html code contact form template

<div class="container">
  <form action="action_page.php">

    <label for="fname">First Name</label>
    <input type="text" id="fname" name="firstname" placeholder="Your name..">

    <label for="lname">Last Name</label>
    <input type="text" id="lname" name="lastname" placeholder="Your last name..">

    <label for="country">Country</label>
    <select id="country" name="country">
      <option value="australia">Australia</option>
      <option value="canada">Canada</option>
      <option value="usa">USA</option>
    </select>

    <label for="subject">Subject</label>
    <textarea id="subject" name="subject" placeholder="Write something.." style="height:200px"></textarea>

    <input type="submit" value="Submit">

  </form>
</div>

<style>
	/* Style inputs with type="text", select elements and textareas */
input[type=text], select, textarea {
  width: 100%; /* Full width */
  padding: 12px; /* Some padding */ 
  border: 1px solid #ccc; /* Gray border */
  border-radius: 4px; /* Rounded borders */
  box-sizing: border-box; /* Make sure that padding and width stays in place */
  margin-top: 6px; /* Add a top margin */
  margin-bottom: 16px; /* Bottom margin */
  resize: vertical /* Allow the user to vertically resize the textarea (not horizontally) */
}

/* Style the submit button with a specific background color etc */
input[type=submit] {
  background-color: #04AA6D;
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* When moving the mouse over the submit button, add a darker green color */
input[type=submit]:hover {
  background-color: #45a049;
}

/* Add a background color and some padding around the form */
.container {
  border-radius: 5px;
  background-color: #f2f2f2;
  padding: 20px;
}
</style>
Comment

PREVIOUS NEXT
Code Example
Html :: inner text and inner html 
Html :: toggle on-click button vue 
Html :: onsubmit in html 
Html :: button html link to another page 
Html :: pop up message on button click in html 
Html :: html ul types 
Html :: how to import popper.js 
Html :: how to display the first frame of the video element in html 
Html :: how to use the label tag in html 
Html :: html image 
Html :: java replace all html tags 
Html :: html target blank 
Html :: Link to chat in telegram 
Html :: make text bold js 
Html :: HTML Image Maps 
Html :: html practice exercises 
Html :: free html dashboard templates 
Html :: what does html stand for 
Html :: HTML DOM innerText 
Html :: uncaught error: bootstrap 
Html :: where are mac notes stored 
Html :: how to use different font size in same line in html 
Html :: img srcset 
Html :: textbox with dropdown bootstrap 
Html :: html instagram 
Html :: html textarea along with cursor position set 
Html :: how to pass dynamic url in Link react 
Html :: how to add a blinking text in html 
Html :: bold font html 
Html :: Chrome Extension change popup 
ADD CONTENT
Topic
Content
Source link
Name
4+8 =