HTML Element Style How to - Turn div to inline block


We would like to know how to turn div to inline block.


<!DOCTYPE html>
<style type='text/css'>
body {<!-- w w  w  . j  a  v  a  2 s  . c  o  m-->
  text-align: center;

#spry {
  background-color: red;
  display: inline-block;
  <div id="spry">
    <p>hello there</p>

The code above is rendered as follows: