Bule Posted December 31, 2012 Share Posted December 31, 2012 I'm using the W3C HTML validator to make sure I don't have errors in my HTML as I learn about it This error is throwing me a bit. It complains about Line 56, Column 7: No p element in scope but a p end tag seen. This is the section of HTML around there<p> Just a simple unordered list <ul> <li>Item unordered 1</li> <li>Item unordered 2</li> <li>Item unordered 3</li> </ul> </p> <p> Just a simple ordered list <ul> It seems that the unordered list forces termination of the paragraph? If that is correct, then the sentence "Just a simple unordered list" should be delimited by the </p> tag? And thus, if I wanted an "association" between the sentence and the table, the way to do it is with a <div> tag? Link to comment Share on other sites More sharing options...
davej Posted December 31, 2012 Share Posted December 31, 2012 I have read that the paragraph tag cannot contain block elements. It can only contain inline elements. Link to comment Share on other sites More sharing options...
Labtec Posted December 31, 2012 Share Posted December 31, 2012 What do yuou mean by an "association between the sentence and the table"? You can use an element such as a <span> tag within a <p> as it is inline and has no margin or padding values by default, IIRC. I always use <span>'s inside <p> elements if I want a different style applied to an area of text. Regards, Lab. Link to comment Share on other sites More sharing options...
boen_robot Posted January 1, 2013 Share Posted January 1, 2013 What do yuou mean by an "association between the sentence and the table"? I think he means "semantic association", as in "it's meant to be this way", as opposed to "it looks this way".And thus, if I wanted an "association" between the sentence and the table, the way to do it is with a <div> tag? Lists, tables, and any non-inline element can't be part of a paragraph, as already stated. So yes, if you want to group a piece of text and something else, it's best to surround the group with a different element, such as "div". Link to comment Share on other sites More sharing options...
Bule Posted January 1, 2013 Author Share Posted January 1, 2013 OK Boen, thank you, both for understanding my bad semantic syntax and for the advice you and davej gave. I guess there is a little difference between sentence structures and web page structures... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now