HTML Form: Placeholder text

This entry is part 6 of 10 in the series HTML Form

Placeholder text is supported in HTML 5 and it is getting popular in mobile app because of limited screen size.

In the previous example, we could have created the form using placeholder text.

<!DOCTYPE html>
<html>
<head lang='en'>
    <meta charset='UTF-8'>
    <title>Codecrawl.com-Form</title>

</head>
<body>

<form method='post'>
    <input type='text' name='name' placeholder='Name'>
    <br>
    <input type='text' name='phone' placeholder='Phone'>
    <br>

    Comments:
    <br>
    <textarea name='comment' rows='3' placeholder='Your comment here'></textarea>
    <br>
    <input type='submit' value='Send'>
    <input type='reset' value='Clear'>
</form>
</body>
</html>


Placeholder Text Output

Series Navigation<< HTML Form: Creating a Submit or Reset button
HTML Form: Form that is sent through Email >>