Support » Fixing WordPress » Using the <br> tag

  • Hello,

    I wanted to add some useful links to my sidebar.php ,but was wondering if using the <br> tag was correct when using php?

  • <h2>Navigation</h2>
  • */

Viewing 11 replies - 1 through 11 (of 11 total)
  • <br> should be okay, but you may have to change it to <br /> if you want it to validate. If it’s a navbar, most people would just adjust the margins using CSS.

    Well, with a couple of caveats: it’s actually in the xhtml that you’re using it, so you need to use <br /> (the self-closing xhtml version); and depending on where you put the breaks, they may not validate. Then you get to move them around if validation is important to you (it’s not to many people….)

    Links in a sidebar should be listed in unordered lists using li tags.

    rossz: depends entirely on theme. I have various themes which don’t need the extra <li> since the links are held outside the nested links area.

    You can’t really make sweeping statements like that.

    I disagree. Lists of links are lists. Therefore they should be formatted with the li tag and proper css.

    Okay…. whatever. Depends on what you call proper I guess. To me proper is whatever validates, and displays appropriately in all major browsers.

    It’s that kind of thinking that got us tables nested twenty levels deep on far too many websites. Yes, it works. Yes it validates. No, it is not a good practice. Have you ever tried to make changes to one of those websites? I have. It’s a painful process.

    Take a look at for some reasons why using lists is the preferred way to go.

    Heh. Friend, I’ve been redesigning crap websites for 10 years.

    ‘nough said. (BTW, did I say anything about tables? No. And while listamatic is okay, there are FAR better sites for good CSS info out there.)

    You’re both right. It’s best-practice v. practical thinking, and if someone finds the golden answer to that debate, let me know.

    True in essence…. I tend to not want nested lists either, though…. lists are the web2.0 tables, ain’t? *laughing*

    Thanks for the reply guys.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Using the <br> tag’ is closed to new replies.