Text and Images from Slide
DIV and SPAN Tags
Copyright Karen McCall, Karlen Communications
3
- <DIV> Tags are used much like "section breaks" in Word. They divide pieces of content or "block elements" and let you apply structure and formatting to larger chunks of content.
- Use a <div>…</div> Tag to format a navigation bar and another <div> Tag to format the content. (the sample web page with the nav bar on left and content on right)
- <SPAN> Tags are used to group format/structure inline elements..
- In the sample web page, the <span>…</span> Tag is used to identify text that is displayed on the screen when one of the navigational links is rolled over with a mouse.
- The text for the <span>…</span> is within the text for the <a href…>…</a> Tag in our sample web page. So it is "inline" with other content.
- Both the <div>…</div> and <span>…</span> Tags can be customized with CSS.