Home >Web Front-end >HTML Tutorial >Use vertical-align to align input and img_HTML/Xhtml_Web page production
Put input and img on the same line. The img tag is always higher than the input, which is very ugly. I have tried many methods before, but none of them work. Later, the most searched thing on the website was to add an align="absmiddle" attribute to img. This method seems feasible, but it does not comply with HTML standards. Later, I accidentally discovered that adding vertical-align:middle to input and img at the same time is enough: