I'm coding a web site using XHTML 1.0 and CSS and on some pages, my <br /> tag inserts a break AND a space, and in others, it inserts just a break - now, I can clutter up my coding with extra tags, but I don't like to do that - I'm relearning all of this and I'm sure it's completely simple. Examples: <div align="center"><h1>Title</h1></div><br /> <h3><b>TERM</b> this sentence defines the term.</h3> <br /><h3>This is some more stuff that defines the term.</h3> </div> Above coding is fabulous. Breaks, spaces between title and paragraphs. It works. Then there's this: <h3><b>Bold Name of Project</b><br /> for client<br /></h3> and then, because my div works, we have the defining features in paragraph form down here without any need for pesky tags. except for some reason on THIS page the <br /> is only breaking the line and not inserting a space. If it matters, they're both hooked into the same div element on the stylesheet. I feel like a moron. The end. Thanks!
And as a response to my own question (I'd like to know if I'm correct, but my troubleshooting seems to have garnered some results) - It actually matters whether the <br /> is at the end of the line (where it will leave linebreak, no space) and at the beginning of the new line (where it leaves a line break and a space)??? Has it always been this way? Is it because of the HTML editor I'm using? And to continue with an edit - it doesn't seem that the above "fix" is correct - I have the <br /> at the end of one line in the first example (that works the way I want it to, though only because I WANT a space in that case, I'd like to be able to do both) and the beginning of another and they both insert spaces.
It must be something with your text editor, the <br /> doesn't enter a space along with the line break. Also, you shouldn't need a line break within any header (<h3>), as it is a block element and will create its own line break per say.
HDGwebdev is right the space is caused by the H3 tag that you have. you won't need a <br /> after the H3 tag as it does this itself
I am using CSS for design, this is solely for the large blocks of text I'm putting on the page. Thank you!! I'll fiddle with the header tags once I figure out how to make my forms work properly.