title: Simple Login form with HTML,CSS and Javascript
body: <p>I am trying to build a simple login form with HTML and CSS and I am using Javascript for empty field validations.</p>
  
  <p>Here is my <a href="https://jsfiddle.net/fuwd0Lzo/6/" rel="nofollow noreferrer">jsfiddle</a></p>
  
  <p>I am trying to validate for empty text on the textboxes and display the error message below each textbox using the css and HTML.</p>
  
  <p>CSS</p>
  
  <pre><code>.validation
  {
    color: red;
    margin-bottom: 20px;
  }
  </code></pre>
  
  <p>Javascript</p>
  
  <pre><code>$("#txtUsername").parent().after("&lt;div class='validation' style='color:red;margin-bottom: 20px;'&gt;Please enter username&lt;/div&gt;");
  </code></pre>
  
  <p>I am trying to follow this <a href="https://stackoverflow.com/questions/25572882/how-to-show-validation-message-below-each-textbox-using-jquery">question</a> and replicate same but somehow it it not working.</p>
  
  <p>Any help?</p>
  
  <p>Thanks in advance.</p>