how to give space in html

Discussion in 'HTML & Website Design' started by rabi_nawaz, Jul 30, 2012.

  1. #1
    i want to type this in html.

    My name is Rabi ......................................... I am Web developer

    i type this in notepad

    <html>
    <body>
    <title>My First</title>
    <h3>My name is Rabi</h3> <h3>I am Web Developer</h3>
    </html>
    </body>

    in the result the words showing like this

    My name is Rabi I am Web Developer

    I need like this

    My name is Rabi ................................................... I am Web Developer

    I mean i want to give space. whats the tag or code i use?
     
    rabi_nawaz, Jul 30, 2012 IP
  2. pupul

    pupul Prominent Member

    Messages:
    1,737
    Likes Received:
    66
    Best Answers:
    2
    Trophy Points:
    340
    #2
    Use this for Empty Space
    &nbsp;
    Code (markup):
     
    pupul, Jul 30, 2012 IP
  3. rabi_nawaz

    rabi_nawaz Greenhorn

    Messages:
    51
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #3
    thanks a lot
     
    rabi_nawaz, Jul 30, 2012 IP
  4. Sitesupplier

    Sitesupplier Peon

    Messages:
    16
    Likes Received:
    2
    Best Answers:
    1
    Trophy Points:
    0
    #4
    Instead of just adding in a load of "&nbsp;", why not opt for the easier and more graceful option of simply using:
    <style type="text/css">
    #spacer
    {
        width: 150px; 
        display: inline-block;
    }
    </style>
    
    <p>My name is Rabi<div id="spacer"> </div>I'm a web developer</p>
    Code (markup):
    This way your mark-up isn't annihilated by 20 ugly "&nbsp;" inserted every time you want to make some space.
     
    Sitesupplier, Jul 30, 2012 IP
  5. kinza

    kinza Member

    Messages:
    21
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    31
    #5
    &nbsp;

    tag is use for space
     
    kinza, Jul 31, 2012 IP
  6. llcseoharvest

    llcseoharvest Peon

    Messages:
    23
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    @rabi_nawaz

    You can visit this site for some free tutorials and many more w3schools/w3-schools.com. Site was very helpful to me.
     
    llcseoharvest, Jul 31, 2012 IP
  7. SamedMermer

    SamedMermer Member

    Messages:
    15
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #7
    &nbsp; 'That code is working !
     
    SamedMermer, Jul 31, 2012 IP
  8. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #8
    Why is your title tag in the BODY? What makes those two separate headings and/or starts of subsections of the page? Do you have a H2 and H1 before that H3, otherwise what makes them a H3... Why are you closing your body and html tags in reverse?

    and to be frank, what you are asking for has ZERO business in the markup. ASSUMING that would be a heading tag... I'll use a H1 for this...

    HTML:
    <h1><span>My name is Rabi</span> I am Web Developer</h1>

    CSS:
    
    h1 {
      overflow:hidden; /* wrap floats */
      zoom:1; /* trip haslayout, wrap floats legacy IE */
      text-align:right;
    }
    
    h1 span {
      float:left;
    }
    
    Code (markup):
    Though to say what the PROPER markup would be, I'd have to see that in context on a full page.
     
    deathshadow, Aug 1, 2012 IP