-
What is a block tag?
A block-level element always starts on a new line and takes up the full width of a page, from left to right.
Block elements: <div><h1><h2>h3>etc. <p>
Styles can over-ride both
Inline elements: <span><strong><em>
- Some areas of text can be superseded with span tags
- This is some text, <span style="color: #F00;"> and this is some text in a span tag </span>. And this is some text outside a span tag.
- Text can be grouped into paragraphs or blocks:
- <div>big block of text</div>
- Attributes include align, style, class, ID, mouse events
- For example: (view on the webpage)
This is a test<style type="text/css">
.textexample {border: ridge 3px orange; padding: 8px; background-color: #a0b0c0; color: black; font-size: 18px; font-family: Georgia, "serif"; text-align: center}
.textexample:hover {border: ridge 3px orange; padding: 8px; background-color: white; color: red; }
</style>
<div class="textexample"> This is a test </div> - Some areas of text can be superseded with span tags
<style type="text/css">
.textexample {border: ridge 3px orange; padding: 8px; background-color: #a0b0c0; color: black; font-size: 18px; font-family: Georgia, "serif"; text-align: center}
.textexample:hover {border: ridge 3px orange; padding: 8px; background-color: white; color: red; }
</style>
<div class="textexample"> This is a test </div>