Home > OS >  how to give margin/padding to a particular word in a sentence using css
how to give margin/padding to a particular word in a sentence using css

Time:06-14

<h1>We rise by <span >lifting</span> others up</h1>

I want to give a margin-bottom only to the word "lifting" how should I do that?

CodePudding user response:

.span1 {
 vertical-align:super;
}
<h1>We rise by <span >lifting</span> others up</h1>

CodePudding user response:

You can use the style tag to do some CSS styling.

<style>
    .span1{
        margin: 30px;
        padding: 12px;
    }

</style>

CodePudding user response:

.span1 {
  display: inline-block;
  margin: 10px;
  padding: 10px;
}
<h1>We rise by <span >lifting</span> others up</h1>

  • Related