Bootstrap Media Object
In this section we will discuss media objects in Bootstrap. These abstract object styles are used to suggest a variety of component types (such as blog comments), where we can mix images and text, with images aligned to the left or right. Media objects allow you to mix media with text using less code.
You can add either of the following two forms to your HTML markup to set up a media object:
- .media: This class allows the media inside the media object (images, video) to float to the left or right of the content block.
- .media-list: Use this class if you need a list where the items are part of an unordered list. It can be used for comment lists and article lists.
Let's look at an example of using the .media class for media objects:
Media heading
This is some sample text. This is some sample text.
This is some sample text. This is some sample text.
This is some sample text. This is some sample text.
This is some sample text. This is some sample text.
The above example displays as follows:

Let's look at an example of using the .media-list class for media objects:
-
Media heading
This is some sample text. This is some sample text.
This is some sample text. This is some sample text.
This is some sample text. This is some sample text.
This is some sample text. This is some sample text.
-
Media heading
This is some sample text. This is some sample text.
This is some sample text. This is some sample text.
This is some sample text. This is some sample text.
This is some sample text. This is some sample text.
The above example displays as follows:
