PGTUTOR.COM
You are here: HOME >> HTML tutor >> Lesson 6

HTML tutor- Lesson 6

One very useful tag in HTML is the <pre> tag- preformatted text. Type the following in Notepad:

<body>
A
 B
  C
   D
  E
 F
G
</body>

View your webpage here

Now try the following:

<body>
<pre>
A
 B
  C
   D
  E
 F
G
</pre>
</body>

View your webpage here

It's pretty self explanatory. And notice that monospaced (typewriter text) is used.


Now we'll talk quickly about comments. Any text within <!-- and --> will be ignored by the browser. For example:

<body>
<!--Don't dare copy my content! -->
Your content....
<!--Thank you for visiting my website -->
</body>

View your webpage here

You can use comments to better assist someone who might be viewing your source code or make it easier for yourself to edit your website in the future. It's a good practice to use comments. In fact when you get into advanced programming, you're not a good programmer unless you're using comments.


PgTutor - The easy way to make a website ...
Lessons: Intro 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25



PGTUTOR is an award winning website. In the past 2 years, we've won over 20 legitimate awards. Go to our awards page to verify for yourself.




You're not taking a risk when buying our products. If for any reason you're unsatisfied with the quality of our product(s), we'll refund your money. Also, you get to keep the product you bought.