skip to Main Content

I want “p” to be lowercase, 12px Helvetica font, light, centred. I want DREAMWEAVER AND, PHOTOSHOP, INDESIGN AND, ILLUSTRATOR to be capital, bold, 12px Helvetica font, bold, centred. There needs to be a line break or line height space. How do I have 2 text styles?

My code so far:

Today’s lesson is
DREAMWEAVER AND
PHOTOSHOP
and also
INDESIGN AND
ILLUSTRATOR

2

Answers


  1. you can add the different words in span and style them like this:

    <p>
    Today's lesson is<br>
    <span>DREAMWEAVER AND
    PHOTOSHOP</span>
    and also<br>
    <span>INDESIGN AND
    ILLUSTRATOR</span>
    </p>
    

    and the style

    p{
    font-family:Helvetica, Arial, sans-serif;
    font-size:12px;
    }
    
    p span{
    
      display:block;
      font-size:12px;
      font-weight:bold;
      font-family:Helvetica, Arial, sans-serif;
      text-align:center;
    }
    
    Login or Signup to reply.
  2. Use heading codes for those texts.
    Example:

    Today's lesson is
    <h1>DREAMWEAVER AND PHOTOSHOP</h1>
    and also
    <h1>INDESIGN AND ILLUSTRATOR</h1>
    

    Then use style.css to manipulate heading 1, like:

    h1{
    font-size:12px;
    font-weight:bold;
    font-family:Helvetica, Arial, sans-serif;
    text-align:center;
    }
    

    You can also manipulate paragraph:

    p{
    font-family:Helvetica, Arial, sans-serif;
    font-size:12px;
    text-align:center;
    }
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search