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>
<head lang='en'>
    <meta charset='UTF-8'>


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

    <textarea name='comment' rows='3' placeholder='Your comment here'></textarea>
    <input type='submit' value='Send'>
    <input type='reset' value='Clear'>

Placeholder Text Output

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

Leave a comment

Leave a Reply