Sikroth Posted February 23, 2012 Share Posted February 23, 2012 Hello everybody; I have a quick question: Is it possible (and by possible I mean valid and correct) to place some text without a container tag? For example this code (assuming header is well written, etc). <body> <p>This text is inside a paragraph and is valid</p> This text is placed directly on the body. Is it valid? </body> Would it be valid XHTML? Thanks in advance, and sorry if my english is bad! Link to comment Share on other sites More sharing options...
dsonesuk Posted February 23, 2012 Share Posted February 23, 2012 It depends on <doctype!> used, Transitional doctype would be fine, Strict would throw a invalid warning stating it should be within a block element container as in <p> or <div>, BUT not! inline element as <span>, <strong> or <em>. Link to comment Share on other sites More sharing options...
ProblemHelpPlease Posted February 23, 2012 Share Posted February 23, 2012 .... and your english is perfect!! Link to comment Share on other sites More sharing options...
Sikroth Posted February 23, 2012 Author Share Posted February 23, 2012 It depends on <doctype!> used, Transitional doctype would be fine, Strict would throw a invalid warning stating it should be within a block element container as in <p> or <div>, BUT not! inline element as <span>, <strong> or <em>. Okay, that's what I thought. I had a bit of a discussion with a friend about the subject, because he usually works with transitional XHTML and therefore had no problems with text directly on the body, but I told him to always place it inside a paragraph . Thank you! .... and your english is perfect!! Thanks! It's good to know Link to comment Share on other sites More sharing options...
thescientist Posted February 23, 2012 Share Posted February 23, 2012 I had a bit of a discussion with a friend about the subject, because he usually works with transitional XHTML I think you already win the argument right there... Is it possible (and by possible I mean valid and correct) Transitional should not be used for any new development, it was only included to help out older sites that were long past their prime but still wanted to validate. Transitional in this cases implies transitioning from no DTD to a Strict DTD. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.