Join Bill Weinman for an in-depth discussion in this video Preserving pre-formatted text, part of XHTML and HTML Essential Training.
- View Offline
- Exercise Files
Normally, white space is folded together and otherwise ignored.…So, new lines and all that become one space and text is formatted like this in…the browser like we see here, in a paragraph.…Sometimes however, you might want the text to be formatted in a particular way,…like in this example here, in my text editor.…And the way you accomplish that is with the Pre tag.…So, I'll just go ahead and change these p's into pre's.…That's the Pre tag.…It's a block-level tag and what it does is it displays in the browser exactly…how it is in the text editor.…
So, it will be monospaced and it will be indented just like this and the blank…lines and everything.…It will be just as it is there in the text editor and there we have it.…You will notice a couple of things.…First of all, it is a block-level element and so it will behave like that.…It will separate the blocks of text out of as if they were paragraphs.…Also, you'll notice, of course, that the text is monospaced and that it's…indented exactly how it is in the text editor.…
- Understanding the structure of an HTML or XHTML document
- Creating and using templates
- Controlling white space and line breaks
- Making effective use of tables and frames
- Flowing text around an image
- Formatting tables with CSS
- Creating web pages that work properly across platforms and devices
- Reviewing a case study of a complete web site
Skill Level Beginner
1. Introducing XHTML and HTML
2. Text Tags
3. Image Tags
Using inline images3m 17s
4. Link Tags
9. Creating a Simple Web Page from Scratch
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.