Questions tagged [pre]

The

 element in HTML represents preformatted text. Text within this element is typically displayed in a non-proportional font exactly as it is laid out in the file. Whitespaces inside this element are displayed as typed. It is usually used for showing computer code or output.

The <pre> element in HTML represents preformatted text. Text within this element is typically displayed in a non-proportional font exactly as it is laid out in the file. Whitespaces inside this element are displayed as typed. It is usually used for showing computer code or output.

384 questions
-1
votes
1 answer

Add a BR tag to every empty line in output

I've made a script which replaces characters, you input text into a text area and the output is put into a tag (to keep all line breaks etc). (this is done using the replace method) Im trying to figure out a way (Using javascript) to insert a tag…
Namenone
  • 344
  • 2
  • 5
  • 19
-1
votes
4 answers

How do I match nested tag?

I need to match pre when it is under long class, like in here:
      some code
  
I tried: long.highlight.pre -- but doesn't seem to be working.
Adobe
  • 12,967
  • 10
  • 85
  • 126
-2
votes
1 answer

Color Attribute in
 tag

Can I change the color attribute of a Pre tag? My main objective is to write white text on a black background using Pre tag in HTML. So I set the bg-color as black, but now when I'm trying to use the Pre tag and write something, the color of the…
BlackHood
  • 13
  • 1
  • 2
-2
votes
1 answer

Show text with
 or nl2br()?

When I think about it, why Should I use the function nl2br() instead of using the tags
 ?
Thanks.
Eliya Cohen
  • 10,716
  • 13
  • 59
  • 116
-3
votes
2 answers

Can you add a hyperlink inside of a
?

Here's the code I'm working with more or less.

Title

            Text Link Text
        
WasteOfADrumBum
  • 217
  • 2
  • 12
-3
votes
1 answer

How do you remove a line from
 without leaving an empty line?

Given a
 containing multiple s, how would you remove one of those s without leaving an empty row?


span {
    background-color: blue;
}
#text2 {
    display: none;
}
    SOME RANDOM TEXT
chustar
  • 12,225
  • 24
  • 81
  • 119
-3
votes
1 answer

How to use
 tag to don't appear in the source code

I would like to render a webpage like the pastebin.com does in a raw view mode. Here is an example on pastebin.com http://pastebin.com/raw.php?i=VawEm8ge if you look to the source code, there is no html code. I tried in this way:
-4
votes
4 answers

What's so special about the
 tag in relation to javascript

Output is: Hello I am new line! Code with pre