HTML - Adding text : 2

Inserting Preformatted Text
  • As we saw in our previous post, browser ignores "Return" and multiple space keystrokes. But at times we need that so that we can work efficiently. <PRE> tag comes to our rescue at this point.
  • <PRE> tag stands for preformatted tag. So whatever we shall type within these tags. It is auto formatted. But the font appears to be like that of typewriter.
  • <PRE> tag is usually used when we need to add programming code in the HTML, like during server side scripting. 

Structure:

<PRE>
            this is one.
            this is two.
            this is three.
</PRE>


Inserting headings
  • Headings are added to web page in such a way that they describe content of page.
  • Just like we see headings in news papers (headlines) or in any other textual material, headings in web page should be meaningful and catchy!
  • <Hx> tag is used to add heading.
  • Structure : <Hx>Heading </Hx>. x is replaced by heading level.
  • There are six levels of headings.
  • Heading 1 with maximum size and Heading 6 with minimum size.
  • Heading appears as BOLD text in browser.
See video below to understand headings!

Adding block quotes:
  • Blockquotes are used to set off particular section/text from rest of the text.
  • Usually block quotes are used when one uses the content from other source.
  • <BLOCKQUOTE> tag is used to add block quotes.
  • The Web browser displays the block quote as inset text on the document page.
  • Multiple block quotes can be used to increase intent.
Adding comments:

  • When you create a web page using HTML, it appears understandable but when you need to edit it further it may seem to you as if you can not comprehend it. So comments helps you in this case.
  • Adding comments helps you to understand the code later when you want to edit the existing code.
  • Comments do not appear in the web browser. They are just for reference purpose and can be seen in the source code (html view) only.
  • Structure:
            <!-- This is a comment-->






No comments:

Post a Comment