I am creating a form and it has several text fields, the problem is that the text fields aren't aligned at the centre. How do I align them so that they are positioned exactly at the centre of the page?
CODE:
<body>
<form name="myform" >
Name: <input type="text" name="fname" > <br>
Address: <input type="text" name="address"> <br>
Contact No: <input type="text" name="Contact"> <br>
Email Id: <input type="text" name="email"> <br>
Qualification: <input type="text" name="qual"> <br>
<input type="submit" value="submit" onclick="return validateForm()">
</form>
</body>
OUTPUT:
It would be nice to know how other tags can be aligned at the centre too, such as the img tag.
` for layout purposes. It's sole purpose is to add a hard line break to a body of text. If you ever need to make the line breaks responsive to different screen sizes you now need to re-work you mark up. – Jon P Nov 14 '19 at 04:57