Jump to content


Photo
- - - - -

cool web coding tips


  • Please log in to reply
5 replies to this topic

#1 Sahak

Sahak

    Member

  • Members
  • PipPipPip
  • 78 posts

Posted 03 October 2008 - 05:50 PM

I am studying HTML now on my own and came across the coolest tag

<pre>

Now what does this do? I'll show you
If you typed this out
<body>
///\\___
(@ @)
+----oOO----(_)-----------+
| BARRY GOLDWATER |
| for |
| President |
+-----------------oOO-----+
|__|__|
|| ||
ooO Ooo
</body>
it will look like this in browser
///\\___ (@ @) +----oOO----(_)-----------+ | BARRY GOLDWATER | | for | | President | +-----------------oOO-----+ |__|__| || || ooO Ooo

but placing this powerful tag <pre> and closing </pre>
you get exactly what you typed in editor
<pre>
///\\___
(@ @)
+----oOO----(_)-----------+
| BARRY GOLDWATER |
| for |
| President |
+-----------------oOO-----+
|__|__|
|| ||
ooO Ooo
</pre>
Pretty neat!

#2 Sahak

Sahak

    Member

  • Members
  • PipPipPip
  • 78 posts

Posted 03 October 2008 - 06:08 PM

If you want to check your code place it here
http://validator.w3.org/

and it will check for errors before you publish your pages.

#3 Sip

Sip

    Buffet Connoisseur

  • Members
  • PipPipPipPipPip
  • 8,366 posts
  • Gender:Male
  • Location:Online

Posted 03 October 2008 - 08:15 PM

Funny you should put this up as I can definitely use it right now. I was messing with <TT> and automatically adding &nbsp's and other crap but this should do just fine biggrin.gif

#4 Sahak

Sahak

    Member

  • Members
  • PipPipPip
  • 78 posts

Posted 03 October 2008 - 10:40 PM

QUOTE (Sip @ Oct 3 2008, 08:15 PM)
Funny you should put this up as I can definitely use it right now. I was messing with <TT> and automatically adding &nbsp's and other crap but this should do just fine biggrin.gif

Sip I am glad it was not useless thread biggrin.gif

#5 Sahak

Sahak

    Member

  • Members
  • PipPipPip
  • 78 posts

Posted 04 October 2008 - 11:54 PM

QUOTE (Sip @ Oct 3 2008, 08:15 PM)
Funny you should put this up as I can definitely use it right now. I was messing with <TT> and automatically adding &nbsp's and other crap but this should do just fine biggrin.gif

Sip You may already know this but just in case there is a free wonderful program called Notepad light
You can format anything just like a word program and go to modify and convert to HTML! It does a beautiful clean html in total so what you typed comes out exactly with valid code!
Check it out!

#6 Sip

Sip

    Buffet Connoisseur

  • Members
  • PipPipPipPipPip
  • 8,366 posts
  • Gender:Male
  • Location:Online

Posted 05 October 2008 - 12:30 AM

Cool ... I use UltraEdit and UEStudio for most my editing in windows. In linux, I usually use vim. This thing I was doing the other day was writing a program that would parse a large number of c++ source code files and automatically generate html documentation of a certain type of class I was interested in. As part of that, I was copying program comments directly into the HTML catalog so that's where this <pre> tag came pretty handy to preserve all the spacing.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users