Horje
What is use of text-center Class in Bootstrap ?

The .text-center class in Bootstrap is employed to horizontally centre-align text or content within its parent element. It ensures that text and other inline or inline-block elements are centred within their container, providing a visually appealing layout.

Syntax:

<div class="text-center">
<!-- Text or content to be centered goes here -->
</div>

Explanation: When applied to a <div> or other block-level element, the .text-center the class centres the text or content within that element horizontally. This class is especially useful for aligning headings, paragraphs, buttons, or other content elements in the centre of a container, improving the overall visual balance and alignment of the webpage.

Features

  • .text-center class centres text or content horizontally.
  • Ensures consistent alignment and readability.
  • Responsive design adapts to different screen sizes.
  • Enhances visual appeal and user experience.

Ref: /archive/bootstrap-5-text-alignment/




Reffered: https://www.geeksforgeeks.org


Bootstrap

Related
What is use of the table-striped Class in Bootstrap ? What is use of the table-striped Class in Bootstrap ?
What is the use of justify-content Class in Bootstrap ? What is the use of justify-content Class in Bootstrap ?
How to Create a Three-Column Layout in Bootstrap? How to Create a Three-Column Layout in Bootstrap?
How to create a Responsive Image in Bootstrap? How to create a Responsive Image in Bootstrap?
What is use of Columns in Bootstrap Grid System ? What is use of Columns in Bootstrap Grid System ?

Type:
Geek
Category:
Coding
Sub Category:
Tutorial
Uploaded by:
Admin
Views:
12