Results 1 to 12 of 12

Thread: New Line Tips in HTML

  1. #1
    Join Date
    Mar 2011
    Location
    Bangalore
    Posts
    127

    New Line Tips in HTML

    Sometimes you want on a web page to be a large number of empty lines. If you do, you will have to use <br>
    Simply insert <br> wherever you want there to be a new line.
    For example, if you want 5 lines to be skipped, use this HTML code:
    <br><br><br><br><br>
    It will create this:

    You can put the br tag nearly anywhere in your html document. Make sure that it is in the body, however.

  2. #2
    Join Date
    Oct 2011
    Posts
    116
    I agree my friend <br> is a nice tag for creating a new line.

  3. #3
    Join Date
    Jun 2012
    Location
    Miami, Florida, USA
    Posts
    20
    <br> tag:

    - Generally, It is supported in all major browsers
    - It inserts a single line break
    - It is an empty tag with no end tag

  4. #4
    Join Date
    Feb 2011
    Location
    Wiltshire, England
    Posts
    390
    However because it is a "Empty Tag" or has no ending tag it is known as a self closing tag so instead of using "<br>" we use "<br />" with the advancement of HTML 5 and XHTML4.0 etc.

    All though might I suggest adding a div for multiple lines.

    Code:
    <div style="height: 100px; with: 100%;"></div>
    With the use of CSS you can simplify this even more so.
    Code:
    <style type="text/css">div.break {width: 100%; height: 100%; overflow: hidden;}</style>
    
    <p>This is some text...</p>
    <div class="break"></div>
    <p>After a 100 px break, this is some more text...</p>
    <div class="break"></div>
    <p>After another 100 px break here is even more text.</p>
    This is not only more acceptable but also more flexible. If you decide that 100px (4/5 x <br>) is to many then just change the CSS.
    If ever in doubt about a threads purpose report it and let webdev mods or admins be the judge. If we don't know we can't help.
    "Coffee is the saviour of mankind!"
    Web Design Wiltshire
    My Blog

  5. #5
    Join Date
    Apr 2012
    Posts
    31
    <script>
    document.write("Hello World!")
    </script>

  6. #6
    Join Date
    Apr 2012
    Location
    Canada
    Posts
    54
    Thanks friends ,
    This is really great information thread .
    Please tell me what is BB Code ? why we are use this code ?

  7. #7
    Join Date
    Feb 2011
    Location
    Wiltshire, England
    Posts
    390
    BBCODE is a way of controlling what HTML code users can put into a form. It's also got to do with MYSQL injections. Have a look at how the proccess is done on google. Can be a massive tool in your arsonry.
    If ever in doubt about a threads purpose report it and let webdev mods or admins be the judge. If we don't know we can't help.
    "Coffee is the saviour of mankind!"
    Web Design Wiltshire
    My Blog

  8. #8
    steve0 is offline New Member: Posts Will Be Moderated
    Join Date
    Jan 2013
    Posts
    2
    Agree with you friend.. I think <br> tag is very essential for lines..

  9. #9
    Join Date
    Apr 2012
    Location
    Canada
    Posts
    54
    Hi Pixel,
    Thanks for the reply , I think this ans is help me

  10. #10
    Join Date
    Apr 2012
    Posts
    31
    <input type="text"> defines a one-line input field that a user can enter text into:
    <form>
    First name: <input type="text" name="firstname"><br>
    Last name: <input type="text" name="lastname">
    </form>

  11. #11
    Join Date
    Mar 2011
    Location
    Bangalore
    Posts
    127
    Thanks to all of you who made this thread more informative.

  12. #12
    Join Date
    Jan 2013
    Posts
    6
    HTML is use to create webpages and on page optimize site. It's unique.

Similar Threads

  1. Javascript Tips with HTML tables
    By Considerate in forum Client & Server Side Scripting (PHP, ASP, JavaScript)
    Replies: 0
    Last Post: 20 Jun 2010, 08:37 PM
  2. New Ubuntu package: command-line W3C HTML validator
    By mrclean in forum Web Design, HTML Reference and CSS
    Replies: 0
    Last Post: 12 Dec 2009, 05:41 PM
  3. want to lern on line html
    By chetansingh143 in forum Web Design, HTML Reference and CSS
    Replies: 1
    Last Post: 08 Oct 2007, 09:46 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •