For example if the name field is not filled out a message will appear under the field itself indicting that this is a required field?
The required attribute will do exactly as you want. However, it is absolutely not a substitute for server-side validation. In the case of text inputs all required really does is check for empty.
<input type="text" id="name" name="name" required>