![]() |
|
![]() |
||
![]() |
![]() |
|
XHTML Span - Creating Inline SpansThe XHTML span tag alows you to further organize your page's content into smaller chunks or spans of information. By naming spans of text, you can use Cascading Style Sheets (CSS) to apply styles to those regions in a global manner. The XHTML span tag simplifies the development of advanced layouts by further decoupling a page's content from its' presentation on a more granular level. XHTML <span> ExampleHere's an example XHTML code fragment that shows a typical use of the span tag, used to apply various formatting to certain in-line aspects of a page's contents: Code Sample: The preceeding XHTML span example shows how you might use span tags to mark up certain aspects of a page, for example, code fragments, which might be displyed using a monospace font like courier new -- or to bring attention to certain key words that might require special emphasis, for example, through the application of an underline, bold, or larger font face. Every enclosed <span> references either a class or an id, which corresponds to a particular style defined in a stylesheet somewhere else - typically in a separate file. Using XHTML span you could then update your styles for code text, or emphasis text, or whatever, simply by updating a single stylesheet, rather then manually going through all of your documents, which is more managable and saves time. Code Sample — browser view
XHTML Span TutorialTo break up a page into different divisions, follow these steps:
Tips and Tricks on How to use the XHTML Span Tag
HTML TutorialsDid you know that learning HTML is fun and easy? There are many very good tutorials online to help you learn HTML in your spare time, so you can build your own web page.
|
|
||||||||||||||||||||||