Results 1 to 6 of 6

Thread: [RESOLVED] [HTML] Question on indenting

  1. #1

    Thread Starter
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Posts
    12,389

    Resolved [RESOLVED] [HTML] Question on indenting

    I'm trying to figure out how to do a simple indent in HTML. I've read that CSS is really the best way to create an indent, however I want to work in pure HTML for now. From what I've read up on, there are 3 options(that I know of)
    1. Blockquotes
    2. Spacers
    3.  

    Which do y'all suggest? If not one of these, then what do y'all use?
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | HtmlLessons | CssLessons | Code Tags | Sword of Fury - Jameram

  2. #2
    Frenzied Member tr333's Avatar
    Join Date
    Nov 2004
    Location
    /dev/st0
    Posts
    1,605

    Re: [HTML] Question on indenting

    What exactly are you trying to indent? <blockquote> is just like a div but with more semantic meaning, so you can style that however you like with CSS. I wouldn't really use it for just indenting text arbitrarily, as the semantics point to it being a block of quoted text (similar to the inline <q>).

    I'm not sure what you are referring to with "Spacers"? Is it the 1px gif thing? That went out of fashion in 1999....

    &nbsp; should never be used for spacing/indenting. There is always a better way to do it.


    If you want to indent the first line of a paragraph of text, then text-indent is what you're looking for. Otherwise, just assign padding-left or margin-left to the block-level element surrounding the content you want to indent. Also, try to always specify the padding/margin units in em instead of px.
    Last edited by tr333; Nov 29th, 2012 at 05:10 PM.
    CSS layout comes in to the 21st century with flexbox!
    Just another Perl hacker,

  3. #3

    Thread Starter
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Posts
    12,389

    Re: [HTML] Question on indenting

    Spacers I've read were developed by netscape. I don't really know what it is to be honest. But the reason I don't want to us CSS yet is because I want to really understand HTML first before I start learning CSS. Using &nbsp; 5 times is really what I'm looking for the indent, but it doesn't look(or feel) right, that's why I wanted to know of a pure html indent.
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | HtmlLessons | CssLessons | Code Tags | Sword of Fury - Jameram

  4. #4
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: [HTML] Question on indenting

    text-indent is what you're looking for... if it makes you feel better about not using CSS (crazy idea though it is) and being "pure" HTML, stuff it in the style attribute of the <p> tag... when it comes to formatting and positioning, you either have to start to embrace CSS, or at the least start using style attributes... but in reality html is about the content, not the look & feel.

    And now I'm sure someone is going to argue this... what ever.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  5. #5

    Thread Starter
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Posts
    12,389

    Re: [HTML] Question on indenting

    Ok, being put like that it makes alot more sense now. So...
    HTML - Content
    CSS - Style
    JavaScript/PHP - Interaction?
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | HtmlLessons | CssLessons | Code Tags | Sword of Fury - Jameram

  6. #6
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: [HTML] Question on indenting

    Yeah, we could say that HTML is just for layouts. I mean like the basic structure of a building. And CSS is for styling. For example, the paints for this building.

    Javascript is for clientside interaction. Means it would be executed at the client's browser. Whereas, a PHP code is server side. Means, it would be executed at the server and what it gives is the result of the execution!


    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

Posting Permissions

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



Click Here to Expand Forum to Full Width