In my HTML code whenever I use sentence like below :
<p> This is a example sentence </p> or
<h3> This is header Sentence </h3>
It is displaying from extreme left side but I want some space before my sentence starts. For this I am using non breaking space. But it looks very ugly since I need to use 5 to 10 times of non breaking space like this :
I tried to use  
also but in this case also i need to use 5 times. So what other options i have to make my sentence to start with some spaces??
You can use text-indent
property to indent your text inside a p
or h3
Alternatively, if you are looking to pad up entire paragraph or header, you should have a wrapper div
and use padding
or margin
for p
as well as h3
.
But as you said you are using
am sure what you are looking for is text-indent
.
p.class_name {
text-indent: 20px;
}
I've edited your question though, as you only used html tag, I have also added a CSS tag, but if you want a HTML solution than take a look at pre
tag
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments