Thread: "   " ? Anyone know why this is in HTML?

  1. #1
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708

    "   " ? Anyone know why this is in HTML?

    Can anyone tell me what this HTML command is/does? Thx...
    Code:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;
    }

  2. #2
    Registered User
    Join Date
    Jun 2002
    Posts
    15

    html spaces

    html calls it a "non breakable space"

    I'm not sure why it's "non breakable" - but it works just like the space bar.

  3. #3
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    The reason I asked is because I wrote a function to extract the text from tagged HTML pages. After running the function, I noticed this strange "tag". Still, running a superficial search on the net yeilded no direct explanation. So I decided to ask here. Thanks a lot crescen.
    Code:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;
    }

  4. #4
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    It's been a while since I did anything with html, but if I recall correctly, it has to do with line wrapping. If you won't want the line broken yet, you use that. Something like that anyway.

    Quzah.
    Hope is the first step on the road to disappointment.

  5. #5
    Registered User stautze's Avatar
    Join Date
    Apr 2002
    Posts
    195
    I think most people use it to fill an empty table cell.
    'During my service in the United States Congress, I took the initiative in creating the Internet.' - Al Gore, March 9, 1999: On CNN's Late Edition

  6. #6
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    I found that what it does is fix a compatibility issue between IE and Netscape. Supposedly, if there is a blank table cell in Netscape, it will screw up the formatting, so the NBSB was concocted to fill any empty cells...
    Code:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;
    }

  7. #7
    i dont know Vicious's Avatar
    Join Date
    May 2002
    Posts
    1,200
    See &nbsp&nbsp&nbsp I can use it in my posts :P

    &nbsp&nbsp&nbsp&nbsp 4 "& nbsp" make a tab
    What is C++?

  8. #8
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    Pretty cool, dude
    Code:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;
    }

  9. #9
    Registered User
    Join Date
    Jun 2002
    Posts
    5
    The reason that's there is because in HTML, only one space is recognized, all others are truncated.... So say you wanted to type some text up, and there were 5 spaces in between one word and another, you'd place that function between the two words 5 times. Otherwise, if you just hit space 5 times, you'd only see one space in between. If you want to take out anything HTML specific, there's a whole slew of ampersand functions like that. Just look at any HTML resource online and you'll find all the codes... somwhere.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. [C] Displaying HTML in an application.
    By pc2-brazil in forum Windows Programming
    Replies: 2
    Last Post: 12-17-2008, 01:45 AM
  2. Please Help - C code creates dynamic HTML
    By Christie2008 in forum C Programming
    Replies: 19
    Last Post: 04-02-2008, 07:36 PM
  3. Writing an HTML Preprocessor
    By thetinman in forum C++ Programming
    Replies: 1
    Last Post: 09-17-2007, 08:01 AM
  4. Design + HTML
    By orbitz in forum C Programming
    Replies: 8
    Last Post: 11-21-2002, 06:32 AM