HTML – BLOCKQUOTE AND PREFORMATTED TAG

Table of Contents

INTRODUCTION

<BLOCKQUOTE></BLOCKQUOTE>

This particular tag <BLOCKQUOTE> is used to create a quoted paragraph which creates a gap from the regular text and appears as a different entity.

It offsets the text from its surroundings. The output can be checked in the following pictures.

HTML-<BLOCKQUOTE> EXAMPLE CODE

This is a sample code made for <BLOCKQUOTE> SAMPLE.

For trying this out yourself, copy it to your TextPad.

<html>
<HEAD>
<TITLE>
WELCOME TO GYANKOSH.NET
</TITLE>
</HEAD>
<body>
<h2>SAMPLE OF BLOCKQUOTE</h2>
<blockquote> this is blockquote. Any text which you want to highlight
or emphasize or to separate it from the regular text can be written over
here</blockquote>
</body>
</html>
BLOCKQUOTE EXAMPLE CODE

The output of the code is shown below.

BLOCKQUOTE EXAMPLE OUTPUT

DESCRIPTION OF CODE:

The code starts with the standard tags HTML, HEAD, TITLE ETC.

In the BODY TAG the HEADING IS GIVEN in H1 HEADER as already discussed in the previous post.

The BLOCKQUOTE tag is started. All the text is segregated from the other text by this tag as shown in the output. Never forget to close the tags.

HTML-PREFORMATTED TAG

<PRE></PRE>-PREFORMATTED TAG

PREFORMATTED TAG is very useful tag when we copy data from somewhere else and don’t want to spend time in formatting the data again. 

The statement will be more clear with the help of an example.

HTML-<PRE> TAG EXAMPLE CODE

This is a sample code made for <PRE> SAMPLE.

For trying this out yourself, copy it to your TextPad and save it as anyname.html( the name can be of your choice say preformatted.html)

Double Click to run it through any web browser.

<html>
<HEAD>
<TITLE>
WELCOME TO GYANKOSH.NET
</TITLE>
</HEAD>
<body>
<h2>SAMPLE OF PREFORMATTED TEXT</h2>

<h3>TEXT WHICH IS NOT PREFORMATTED</h3>
HI EVERYONE. WE ARE TRYING TO MAKE
THIS TEXT PREFORMATTED BUT WHEN ITS
RUN IN THE HTML FILE. IT’LL REMOVE
ALL THE LINE BREAKS AND APPEAR IN
A SINGLE LINE.

<BR>
<BR>
<h3>TEXT WHICH IS PREFORMATTED</h3>
<PRE>
HI EVERYONE. WE ARE TRYING TO MAKE
THIS TEXT PREFORMATTED WITH THE USE OF
PRE TAG. IT’LL APPEAR THE SAME WAY
IT’S WRITTEN HERE.
</PRE>

</body>
</html>
PREFORMATED TEXT EXAMPLE CODE

The output of the code is shown below.

PREFORMATTED TEXT EXAMPLE OUTPUT

DESCRIPTION OF CODE:

The code starts with the standard tags HTML, HEAD, TITLE ETC.

In the BODY TAG, the HEADING IS GIVEN in H2 AND H3 HEADER as already discussed in the previous post.

The same text is written in the code TWICE. Once without the PRE TAG and one with the PRE TAG.

THE text without the PRE TAG shows the output in the straight line without any line breaks or formatting whereas the text inside the PRE TAG comes out to be exactly the same as written in the code.