<!DOCTYPE HTML><HTMLLang= "en"><Head> <MetaCharSet= "UTF-8"> <title>Document</title> <styletype= "text/css">Div{Height:100px;width:1000px;Background-color:Red; } </style></Head><Body> <!--In-line Labels - <span>Study hard</span> <Strong>Every day</Strong> <s>Hard</s> <!--Block-level Labels - <!--ul,ol,dl are all Block-level labels . - <Div>studious</Div></Body></HTML>
<!DOCTYPE HTML><HTMLLang= "en"><Head> <MetaCharSet= "UTF-8"> <title>Document</title> <styletype= "text/css">Div{Height:100px;width:1000px;Background-color:Red; /*make div blocks into inline elements*/Display:Inline-block; } </style></Head><Body> <!--In-line Labels - <span>Study hard</span> <Strong>Every day</Strong> <s>Hard</s> <!--Block-level Labels - <!--ul,ol,dl are all Block-level labels . - <Div>studious</Div></Body></HTML>
display:inline;
display:block;
display:none;
Inline elements cannot be set width and height
visibility:hidden; Hide but occupy page space
<!DOCTYPE HTML><HTMLLang= "en"><Head> <MetaCharSet= "UTF-8"> <title>Document</title> <styletype= "text/css">Div{Height:100px;width:1000px;Background-color:Red;Display:Block;Visibility:Hidden; } </style></Head><Body> <!--In-line Labels - <span>Study hard</span> <Strong>Every day</Strong> <s>Hard</s> <!--Block-level Labels - <!--ul,ol,dl are all Block-level labels . - <Div>studious</Div></Body></HTML>
CSS units and text layout display