Well to fix the invalidation (if it is, i don’t know personally), you could just add a class to those links, then set that given class to display:block, you’d then get the appearance of new lines without the need to actually write them in… ??
According to W3C specs, as far as I know, and please correct me if I am wrong, this might be incorrect. I believe, as I understand, the proper way might be to go for a nested list or definition list in such cases. But I am not a 100% sure. As far as I understood lists should be used for just lists, and not paragraph style or multiple lines in one go that have a different function. From an accessibility point of view it might be confusing as well. And in some countries accessible design is being made, if it isn’t already, obligated by law. Which is a good thing, as it benefits all. W3C and search engines are keen on accessible design as well. I forgot to add it last time, but the links should have a title tag, which might cancel the need for using a nested list or definition list. I am not sure though about that last part though, or if one should want to go down that road… So far I have found accessibility design has actually made my life as a designer easier.
Displaying the titles linking to posts, and using a complete query to the posts table is inefficient… because you’re essentially grabbing all the data on those posts while only displaying/using 2 pieces of information from that data, however this isn’t uncommon and i see this alot here and on WordPress guides… unless WordPress does some special data flushing after queries then this data is just floating around being unused unless it’s cleared/unset..
Honestly, I haven’t seen enough code written for WordPress to know about that. From a personal programming ethics point of view I would go for the optimized version, keeping database and server load to a minimum. Like I said the code I am writing is code in development. However caching can in this case can eliminate (to some extent) the need to optimize the code, but it would however be ugly code writing in my opinion. But yeah definitely, running for example 100 queries for a 100 tags per post could possibly definitely affect the performance to the point that it could be detrimental (depending on the server setup of course). This is general and not WordPress related. Caching should be able to catch this (to some degree) and save server load on multiple views of the same post, but like I said it depends on the use case whether or not this is a feasible option. There might be better ways to do it, such as rewinding the posts and using the original query.