PNLdev
Tutorial
Front-end
HTML
reference
CSS
reference
JavaScript
reference
En
English
فارسی
En
English
فارسی
Tutorial
Front-end
HTML
reference
CSS
reference
JavaScript
reference
Run
<!DOCTYPE html> <html> <head> <style> img.a { vertical-align: baseline; } img.b { vertical-align: text-top; } img.c { vertical-align: text-bottom; } img.d { vertical-align: sub; } img.e { vertical-align: super; } </style> </head> <body> <h1>vertical-align property example</h1> <h2>vertical-align: baseline (default):</h2> <p>An <img class="a" src="/pic.jpg" width="10" height="10"> image with a default alignment.</p> <h2>vertical-align: text-top:</h2> <p>An <img class="b" src="/pic.jpg" width="10" height="10"> image with a text-top alignment.</p> <h2>vertical-align: text-bottom:</h2> <p>An <img class="c" src="/pic.jpg" width="10" height="10"> image with a text-bottom alignment.</p> <h2>vertical-align: sub:</h2> <p>An <img class="d" src="/pic.jpg" width="10" height="10"> image with a sub alignment.</p> <h2>vertical-align: sup:</h2> <p>An <img class="e" src="/pic.jpg" width="10" height="10"> image with a super alignment.</p> </body> </html>