- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Indent the first line of a paragraph in CSS
Use the text-indent property to indent the first line of a paragraph. Possible values are % or a number specifying indent space.
Example
You can try to run the following code to indent the first line:
<html> <head> </head> <body> <p style = "text-indent:2cm;"> This text will have first line indented by 2cm and this line will remain at its actual position this is done by CSS text-indent property. </p> </body> </html>
- Related Articles
- Indent the text of a paragraph with CSS
- Indent Text with CSS text-indent Property
- Usage of text-indent property in CSS
- Align the text of a paragraph with CSS
- The ::first-line Pseudo-element in CSS
- Animate CSS text-indent property
- Usage of CSS :first-line pseudo-element
- Creating Attractive First Lines with CSS ::first-line
- Which element is used to add special styles to the first line of the text in a selector with CSS
- In a Multiple-line query, what is the significance of the change of MySQL prompt after the first line?
- Set the height of a line of text with CSS
- Increase the font size of a paragraph with Bootstrap
- Create a draggable paragraph in HTML5
- Create a hidden paragraph in HTML5
- What is unexpected indent in Python?

Advertisements