w1coding.comAll tutorials

W3.CSS Forms

W3.CSS lessons
  1. Environment Setup
  2. Introduction
  3. Container
  4. Colors
  5. Buttons
  6. Buttons1
  7. Grids
  8. Images
  9. Cards
  10. Tables
  11. Forms
  12. Navigation
  13. Sliders
  14. Modals
  15. Dropdown
  16. Cards
  17. Alerts
  18. Accordions
  19. Ardions
  20. Tooltips
  21. Pagination
  22. Navigation
  23. Slideshow
  24. Tabs
  25. Model
  26. Animations
  27. Responsive

W3.CSS Forms

W3.CSS provides pre-designed classes for creating clean and responsive forms.

Basic Form Example

<form class="w3-container">
  <label class="w3-text-blue">Name</label>
  <input class="w3-input w3-border" type="text" placeholder="Enter your name">

  <label class="w3-text-blue">Email</label>
  <input class="w3-input w3-border" type="email" placeholder="Enter your email">

  <button class="w3-button w3-blue w3-margin-top">Submit</button>
</form>
    

Customized Form

Combine other classes like w3-padding and w3-round for more customization:

<form class="w3-container w3-padding w3-round w3-light-grey">
  <label class="w3-text-green">Username</label>
  <input class="w3-input w3-border w3-round" type="text">

  <label class="w3-text-green">Password</label>
  <input class="w3-input w3-border w3-round" type="password">

  <button class="w3-button w3-green w3-margin-top w3-round">Login</button>
</form>