Re: About list inside a paragraph

On 2016-09-25 09:25 AM, pierre lafitte wrote:
> Hi, as a web developer I’ve been writing html for years, and html is very good, except for one case which always makes me think that there is something missing: the list inside a paragraph.
>
> Imagine you want to say:
>
> I went shopping today, I bought 4 things:  item1, item2, item3, item4.
The tags in HTML do not specify the appearance of the text, only its 
meaning.  The <ul> and <ol> tags are peers of the <p> and cannot appear 
within a <p>. In HTML a <ul> or <ol> tag _terminates_ an unclosed <p> 
tag as if immediately preceded by a </p>.  XHTML is badly formed if the 
</p> is omitted.  Your "list" does not match the "meaning" of list as 
described by HTML which requires it to be a peer of paragraphs.

You should use a <span> tag with an appropriate style, for example <span 
class="list-item"> to contain each of the items.  This makes each item 
an HTML element that you can treat just like a <li>.  Contain the list 
items inside a <span class="ul-list">.

-- 

James Cobban webmaster@jamescobban.net 
<contactAuthor.php?subject=Email%20Message>
Web-site: www.jamescobban.net <http://www.jamescobban.net/>
34 Palomino Dr.
Kanata, ON, CANADA
K2M 1M1
+1-613-592-9438

Received on Sunday, 25 September 2016 22:03:48 UTC