Top Banner
1 Minute HTML <pre> and <blockquote>
22

1 Minute HTML tutorial - pre and blockquote tags to format text

Jan 17, 2017

Download

Internet

rimaoka
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 1 Minute HTML tutorial - pre and blockquote tags to format text

1 Minute HTML

<pre> and <blockquote>

Page 2: 1 Minute HTML tutorial - pre and blockquote tags to format text

<pre> and without <pre>

Page 3: 1 Minute HTML tutorial - pre and blockquote tags to format text

Without <pre>• Line breaks

• Multiple whitespaces

• Tabs …

Page 4: 1 Minute HTML tutorial - pre and blockquote tags to format text

Without <pre>• Line breaks

• Multiple whitespaces

• Tabs

become a single whitespace

Page 5: 1 Minute HTML tutorial - pre and blockquote tags to format text

Sometimes (e.g.) writing source code

You want those exactly reflected

Page 6: 1 Minute HTML tutorial - pre and blockquote tags to format text

<blockquote> changes

the font

Page 7: 1 Minute HTML tutorial - pre and blockquote tags to format text

This is the normal font

Page 8: 1 Minute HTML tutorial - pre and blockquote tags to format text

If it is a quote,

you want to change the font

Page 9: 1 Minute HTML tutorial - pre and blockquote tags to format text

Let’s see how

<pre> works

Page 10: 1 Minute HTML tutorial - pre and blockquote tags to format text
Page 11: 1 Minute HTML tutorial - pre and blockquote tags to format text

<p> (unlike <pre>) does not reflect

white spaces and line breaks you entered

Page 12: 1 Minute HTML tutorial - pre and blockquote tags to format text
Page 13: 1 Minute HTML tutorial - pre and blockquote tags to format text

Instead, using <pre>…

Page 14: 1 Minute HTML tutorial - pre and blockquote tags to format text

Reflects exactly what

you entered

Page 15: 1 Minute HTML tutorial - pre and blockquote tags to format text

Note that tabs are

also reflected

Page 16: 1 Minute HTML tutorial - pre and blockquote tags to format text

So, if you remove the tab

for the 1st line..,

Page 17: 1 Minute HTML tutorial - pre and blockquote tags to format text
Page 18: 1 Minute HTML tutorial - pre and blockquote tags to format text

… that is reflected so

Page 19: 1 Minute HTML tutorial - pre and blockquote tags to format text

<blockquote>

Page 20: 1 Minute HTML tutorial - pre and blockquote tags to format text

You might want to apply

a special font for a quoted text

Page 21: 1 Minute HTML tutorial - pre and blockquote tags to format text

Then, use <blockquote>

Page 22: 1 Minute HTML tutorial - pre and blockquote tags to format text

Here you see a different font is applied