Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

On small devices, a new line can be added in Bootstrap by using the "d-block" class. This class makes the element a block element, which means it takes up the full width of its container and creates a new line beneath any previous elements.

For example, the following code creates a new line for each item in a list on small devices:

<ul>
  <li class="d-block">Item 1</li>
  <li class="d-block">Item 2</li>
  <li class="d-block">Item 3</li>
</ul>

Alternatively, you can also use the "br" tag to create a line break in the content, like this:

<p>First line of text<br>Second line of text</p>

However, it is generally not recommended to use the "br" tag for layout purposes, as it can make your code harder to maintain and less semantically meaningful.