Preserving pre-formatted text


show more Preserving pre-formatted text provides you with in-depth training on Developer. Taught by Bill Weinman as part of the XHTML and HTML Essential Training show less
please wait ...

Preserving pre-formatted text

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...

Preserving pre-formatted text
Video duration: 1m 30s 4h 44m Beginner

Viewers:

Preserving pre-formatted text provides you with in-depth training on Developer. Taught by Bill Weinman as part of the XHTML and HTML Essential Training

Subjects:
Developer Web
Software:
HTML XHTML
Author:
please wait ...