Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Example of CSS display</title> <style> div { display: inline-block; background: #90EE90; padding: 10px; } span { display: inline-block; background: #F08080; padding: 10px; } </style> </head> <body> <div> <span>This span element and its parent div element generate an inline-block box.</span> </div> </body> </html>