Forum Moderators: open
<br> and have not noticed any drawbacks. The length (i.e. number of words or letters) of the header will likely have a greater impact. Also, misuse of <hn> can have a negative impact (i.e. markup of content that isn't semantically a header). application/xhtml+xml Content-Type. You are much better off forgetting XHTML ever existed (unless you truly need XML capabilities in your document) and stick to HTML4.01 or, better yet, HTML5.
I would like to use something instead of <br /> if it is possible.
As an aside -- I notice that you appear to be using XHTML markup. This is considered harmful unless always accompanied with the appropriate application/xhtml+xml Content-Type. You are much better off forgetting XHTML ever existed (unless you truly need XML capabilities in your document) and stick to HTML4.01 or, better yet, HTML5.
Personally, I would use <br> and have not noticed any drawbacks.
As an aside -- I notice that you appear to be using XHTML markup. This is considered harmful unless always accompanied with the appropriate application/xhtml+xml Content-Type. You are much better off forgetting XHTML ever existed (unless you truly need XML capabilities in your document) and stick to HTML4.01 or, better yet, HTML5.
Why ?
Without the words themselves there's no way to see why you need the line break, or if it's e.g a title and a subtitle. But if it indeed is just one title, then <br /> would seem to be a very good choice.
If the title would make sense on one line, but you want to control where the line break goes due to / in case of a narrow rendering, then you could opt for nobreak spaces instead on regular spaces to prevent the break from creating weird effects.
You're contradicting yourself when it comes to html5: <br /> is perfectly legal in html5 (and xhtml5). Nothing harmful at all. In fact it's quite possible to write code that's both html5 and xhtml5 valid at the same time - it's called polyglot html5:
[dev.w3.org...]
The only thing harmful is tag soup.
<tag /> syntax. I think that the template which I use is XHTML
In xhtml5 there only a very few htmlentities predefined (<, >, &, " and ') so you need to use the UTF-8 encoded nobreak space instead.
Could you not control the size of <h2>, using css, and force a line break.
Is it okay to use a <p> tag inside a <li> tag?
<li>Quo usque tandem abutere, Catilina, patientia nostra?
<p>Quam diu etiam furor iste tuus eludet?</p></li>
<li>Quem ad finem sese effrenata jactabit audacia?</li>
<li>Nihilne te nocturnum praesidium Palatii, nihil urbis vigiliae, nihil timor populi, nihil concursus bonorum omnium, nihil hic munitissimus habendi senatus locus, nihil horum ora vultusque moverunt.
<div class = "group">
<p>Patere tua consilia non sentis?</p>
<p>Constrictam omnium horum scientia teneri conjurationem tuam non vides?</p>
</div>
</li>
Ordinarily there's no reason to double-nest anything.
Instead, style the list items to look the way you want them to look. Most likely you'd do this by attaching a class name to the containing <ul> and then make a
ul li {blahblah here}
and/or
ul > li {blahblah here}
I also want to mention that a list such as this one is going to be on several pages on the site. This is not just on one page.
<li><p>blahblah</b></li>
<ul class = "my-special-class-name">
<li>blahblah</li>
<li>blahblah</li>
<li>blahblah</li>
</ul>
ul.my-special-class-name {margin: 0; padding: 0; list-style: disc outside;}
ul.my-special-class-name li {margin: make-something-up; padding: make-something-up;}
You do have a shared external stylesheet, right?
<li><p>blahblah</b></li>
isn't intrinsically wrong, it's just unnecessary most of the time.
HTML:
<ul class = "my-special-class-name">
<li>blahblah</li>
<li>blahblah</li>
<li>blahblah</li>
</ul>
CSS
ul.my-special-class-name {margin: 0; padding: 0; list-style: disc outside;}
ul.my-special-class-name li {margin: make-something-up; padding: make-something-up;}
ul.classname li
means "any list item within the named <ul>"
ul.classname > li
means "the top layer of list items within the named <ul>"
If you don't have nested lists, it makes no difference.
Would search engines interpret the content of a several sentence bullet point in a list better if there is a <p> tag inside an <li> tag?
I am still trying to understand this.
onething otherthing onething > otherthing ul li ol li ul.super li <ul class = "outer">
<li>one</li>
<li>two</li>
<li>three
<ul>
<li>a</li>
<li>b</li>
</ul>
</li>
</ul>
ul li ul.outer li ul.outer > li