span element
The span
element is a cousin to the div
element -- in that it is used primarily for styling purposes, except that it is geared towards "inline" content.
Example
2.7 - span element - Example 2.7
<div class="citation">
<span class="author">Berners‐Lee, Tim </span>.
<span class="title">
<a href="https://canvas.harvard.edu/courses/95649/files?preview=12898083">We Need a Magna Carta for the Internet </a> </span>
<span class="journal">New Perspectives Quarterly </span>31.3 (2014): 39-41. Web.
</div>
In style
element
(<style>
) within head
element:
.citation .journal { font-style: italic; }
.citation span.title::before { content: '"';}
.citation span.title::after { content: '." ';}
We Need a Magna Carta for the InternetNew Perspectives Quarterly
31.3 (2014): 39-41. Web.
.
See: Inline elements and Block elements from MDN (Mozilla Developer Network)