Place Holder and Label Attributes

 <!DOCTYPE html>

<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Place holder and label</title>
  </head>
  <body>
    <!-- raw approach -->
    <label>
      Username
      <input type="text" placeholder="enter Username" />
    </label>
    <br />

    <!--LABEL CLASSICAL APPROACH-->
    <label for="username">Enter Username:</label>
    <input type="text" id="username" placeholder="username" />
    <br />

    <label for="password">Enter Password:</label>
    <input type="password" id="password" placeholder="password" />
    <br />

    <label for="date">Enter date of birth:</label>
    <input type="date" id="date" placeholder="date" />
  </body>
</html>

Comments

Popular posts from this blog

TextArea

unordered list with image link

Select input form