Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Example of CSS vertical-align property</title> <style> img { vertical-align: middle; } span.sub { vertical-align: sub; } span.super { vertical-align: super; } </style> </head> <body> <p>This is a <img src="/examples/images/smiley.png" alt="Smiley"> smiley image.</p> <p>The chemical formula of water is: H<span class="sub">2</span>O</p> <p>The equation of mass-energy equivalence is: E=mc<span class="super">2</span></p> </body> </html>