Fundamentals: Spans

Tip #1 – <div>s would be at the block-level and <span> is for inline element.

Tip #2 – With a span tag in place it can easily be styled by CSS or interact with JavaScript using the class or id attribute.

Code Along

            <p>He loves the <span style="color:green; font-weight:bold">
                         green</span> of the trees against the
                         <span style="color:blue; font-weight:bold">blue </span> ocean.</p>


  1. Click the play button to watch the video lesson.
  2. Watch the lesson as many times as needed.
  3. Code along with the instructor using the integrated code editor in the center of your screen.
  4. You can use the Run button beneath the code editor to test your code.
  5. Output from the code that you have written will appear in the panel on the right side of your screen.

If you get stuck or need assistance, you can click the button below to connect with a tutor. 

For additional questions or technical support, email