| <!DOCTYPE html> | |
| <!-- | |
| | The property "text-align" dictates the alignment of the inline-level content, | |
| | but does not impact the spacing between that content. | |
| | https://www.w3.org/TR/css3-text/#text-align | |
| --> | |
| <html> | |
| <head> | |
| <style> | |
| body { | |
| margin: 0px; | |
| font-family: Roboto; | |
| font-size: 20px; | |
| } | |
| .containing-block-left { | |
| background-color: #03a9f4; | |
| width: 200px; | |
| text-align: left; | |
| } | |
| .containing-block-center { | |
| background-color: #03a9f4; | |
| width: 200px; | |
| text-align: center; | |
| } | |
| .containing-block-right { | |
| background-color: #03a9f4; | |
| width: 200px; | |
| text-align: right; | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <div class="containing-block-left"> | |
| <span style="display: inline-block">abcd</span> | |
| efgh | |
| <span style="display: inline-block">ijkl</span> | |
| </div> | |
| <div class="containing-block-center"> | |
| <span style="display: inline-block">abcd</span> | |
| efgh | |
| <span style="display: inline-block">ijkl</span> | |
| </div> | |
| <div class="containing-block-right"> | |
| <span style="display: inline-block">abcd</span> | |
| efgh | |
| <span style="display: inline-block">ijkl</span> | |
| </div> | |
| </body> | |
| </html> |