Exploring HTML5 Features: Forms, Media, and Graphics in Web Development
Discover the powerful features of HTML5 that enhance web development. This document covers essential elements such as the for 2D drawing, and for media playback, and local storage support. It introduces new content-specific elements like , , , , and . Additionally, learn about advanced form controls like date, time, email, and more, including input types for user interaction. Experience practical form examples showcasing text, password fields, radio buttons, checkboxes, dropdowns, and text areas.
Exploring HTML5 Features: Forms, Media, and Graphics in Web Development
E N D
Presentation Transcript
Minimum HTML5 Document <!DOCTYPE html><html><head><title>Title of the document</title></head><body>The content of the document......</body></html>
The <canvas> element for 2D drawing • The <video> and <audio> elements for media playback • Support for local storage • New content-specific elements, like <article>, <footer>, <header>, <nav>, <section> • New form controls, like calendar, date, time, email, url, search
Form <form>.input elements.</form>
Form <form>First name: <input type="text“ name="fname"><br>Last name: <input type="text" name="lname"></form>
Form • Password Field <form>Password: <input type="password" name="pwd"> </form>
Form • Radio Buttons <form><input type="radio" name="sex" value="male">Male<br><input type="radio" name="sex" value="female">Female</form>
Checkboxes <form><input type="checkbox" name="vehicle" value="Bike">I have a bike<br><input type="checkbox" name="vehicle" value="Car">I have a car </form>
Form • Submit Button <form name="input" action="html_form_action.asp" method="get">Username: <input type="text" name="user"><input type="submit" value="Submit"></form>
<select> <select> <option value="volvo">Volvo</option> <option value="saab">Saab</option> <option value="mercedes">Mercedes</option> <option value="audi">Audi</option></select>
<placeholder> <form action="demo_form.asp"> <input type="text" name="fname" placeholder="First name"><br> <input type="text" name="lname" placeholder="Last name"><br> <input type="submit" value="Submit"></form>
<textarea> <textarea rows="4" cols="50">At w3schools.com you will learn how to make a website. We offer free tutorials in all web development technologies. </textarea>
<fieldset> <legend> <!DOCTYPE html> <html> <body> <form action=""> <fieldset> <legend>Personal information:</legend> Name: <input type="text" size="30"><br> E-mail: <input type="text" size="30"><br> Date of birth: <input type="text" size="10"> </fieldset> </form> </body> </html>