h3 tag inside an ul?

I’ve got some lists of product specs to make. I wondered if it’s valid XHTML to use an h3 tag inside an unordered list.

I need it to look something like this, although much longer:

Product Specs
Feature one
Feature two
Feature three
Bonus Features
Bonus one
Bonus two
Bonus three

Thank you!

The only direct child of a <ul> can be a <li>. The <h3> within an <li> is fine though. Semantically, it may make more sense if the headings were a definition list, with the <dd>s containing <ul>s

Could I style the <li>'s that were headings? For instance, to appear bold?

Yes, you could. However, if you were just going to go with one unordered list, using the <h3>s (within <li>s) in the appropriate places in the list would have more meaning than just styling the <li> itself.

Yeah, just go for something like this and then style accordingly.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head><title>Demo</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
ul, li, h3 { 
	padding: 0; 
	margin: 0;
}
</style>
</head>
<body>
<ul>
	<li><h3>Product Specs</h3>
		<ul>
			<li>Feature one</li>
			<li>Feature two</li>
			<li>Feature three</li>
		</ul>
	</li>
	<li><h3>Bonus Features</h3>
		<ul>
			<li>Bonus one</li>
			<li>Bonus two</li>
			<li>Bonus three</li>
		</ul>
	</li>
</ul>
</body>
</html>

Thanks for the info!

I’ve been given lots more items to include in the lists than what I originally had, so I think I’ll create separate lists for each category, with an <h3> for each list. I think that will help me keep everything organized better, too, for future reference.