<!DOCTYPE html> <html> <head> <style> .container{ padding:80px; background-color:white; } input[type=text], input[type=password], textarea{ width:100%; padding:5px; margin:5px 0 20px 0; display:inline-block; border:2px solid black; background:white; } .registerbtn{ background-color:green; color:white; padding:10px 10px; margin:10px 0; border:2px solid black; cursor:pointer; width:100%; } .registerbtn:hover{ font-size:10px; } </style> </head> <body> <form> <div class="container"> <center><h1>DRIVING LICENSE REGISTRATION FORM</h1> </center> <hr> <label>Name</label> <input type="text" name="Firstname" placeholder= "Firstname"/> <input type="text" name="Lastname" placeholder="Lastname"/> <div> <label> Country: </label> <select> <option value="Country">select</option> <option value="INDIA">INDIA</option> </select> </div> <div> <label> Gender: </label><br> <input type="radio" value="Male" name="Gender">Male <input type="radio" value="Female" name="gender">Female <input type="radio" value="Other" name="gender">Other <input type="radio" value="Prefer not to answer" name="gender">Prefer not to answer </div> <div> <label> Applying for: </label> <select> <option value="Applying for">select</option> <option value="Driving License">Driving License</option> <option value="Learning Permit">Learning Permit</option> </select> </div> <label> Purpose: </label><br> <input type="checkbox">NEW <input type="checkbox">CHANGE TYPE <input type="checkbox">RENEW <input type="checkbox">UPDATE INFO <input type="checkbox">TRANSFER </div> <label> Mobile Number: </label> <input type="text" name="Mobile Number" placeholder="0000000000"> <label> Date of Birth: </label> <input type="text" name="dob" placeholder="dd-mm-yyyy"> <div> <label> Are you older than 18?: </label><br> <input type="radio" value="Yes" name="age">Yes <input type="radio" value="No" name="age">No </div> Address: <textarea cols="50" rows="2" placeholder="Address" value="address" required> </textarea> <label for="email"><b>Email</b></label> <input type="text" placeholder="[email protected]" name="email" required> <label for="Password"><b>Password</b></label> <input type="password" placeholder="Enter Password" name="Password" required> <label for="Password-repeat"><b>Confirm Password</b></label> <input type="password" placeholder="Confirm Password" name="password repeat" required> <button type="submit" class="registerbtn">Register</button> </form> </body> </html>
Write, Run & Share HTML code online using OneCompiler's HTML online Code editor for free. It's one of the robust, feature-rich online Code editor for HTML language, running on the latest version HTML5. Getting started with the OneCompiler's HTML compiler is simple and pretty fast. The editor shows sample boilerplate code when you choose language as HTML
. You can also specify the stylesheet information in styles.css
tab and scripts information in scripts.js
tab and start coding.
HTML(Hyper Text Markup language) is the standard markup language for Web pages, was created by Berners-Lee in the year 1991. Almost every web page over internet might be using HTML.
<!DOCTYPE html>
<html>
and ends with </html>
<h1>
to <h6>
where <h1>
is the highest important heading and <h6>
is the least important sub-heading.<p>..</p>
tag.<a>
tag.
<a href="https://onecompiler.com/html">HTML online compiler</a>
<img>
tag, where src
attribute consists of image name.<button>..</button>
tag<ul>
for unordered/bullet list and <ol>
for ordered/number list, and the list items are defined in <li>
.<a href="https://onecompiler.com/html">HTML online compiler</a>
CSS(cascading style sheets) describes how HTML elements will look on the web page like color, font-style, font-size, background color etc.
Below is a sample style sheet which displays heading in green and in Candara font with padding space of 25px.
body{
padding: 25px;
}
.title {
color: #228B22;
font-family: Candara;
}
<table>
tag.<tr>
tag<th>
tag<td>
tag<caption>
tag<script>
is the tag used to write scripts in HTML<script src="script.js"></script>