Interactive online courses HTML Academy
2026-03-09 10:56 Diff

During the last step we mentioned that the text-align property is able to align not just text, but also other elements. These elements must be inline. Inline elements may include images, inline blocks, inline tables, and other elements.

For example, in this assignment we will analyze this technique, using text-align to align <img> images inside the container. In other words, in fact we are using this technique to create a simple page layout. But it is very useful to know about this feature of the text-align property, since this is a completely legitimate way of aligning elements.

Continue to the assignment

The topic of inline contextual formatting represents an entire separate world of CSS. The specification describes the different types of blocks that are involved in creating the document flow.