<p> vs <span>

Last post 01-09-2007, 10:33 AM by Adam. 1 replies.
Sort Posts: Previous Next
  •  01-09-2007, 6:06 AM 25645

    <p> vs <span>

    I am using the advantage of template keywords (contentEditable,unselectable) to edit a restricted area on a document.
    Below is the standard definition of an editable region on my default xml file.

    <div id="EditLayer4" contentEditable=false unselectable="ON" align="left" 
    style="position:absolute; overflow:hidden; display:none; z-index:11; border:1px #ccc dotted; left:40px; top:10px; width:120; height:110;">
     <p>
       <span style="FONT-SIZE: 12pt; FONT-FAMILY: Georgia">Edit this content....</span>
     </p>
    </div>

    My question is regarding the priority/importance of the tags p and span....
    Do I need to enclose the span tag with the p tag?
     
    What about if I decide to apply another size to the word "content"..... is valid to have it without p tag like in the example below...

    <div id="EditLayer4" contentEditable=false unselectable="ON" align="left" 
      style="position:absolute; overflow:hidden; display:none; z-index:11; border:1px #ccc dotted; left:40px; top:10px; width:120; height:110;">
     <span style="FONT-SIZE: 12pt; FONT-FAMILY: Georgia">Edit this</span>
     <span style="FONT-SIZE: 16pt; FONT-FAMILY: Georgia">....content....</span>
    </div>

    Should I use <p> or I can do it with <span>?
    What its the better choice for the CuteEditor health (meaning parser eficient) ?
     
  •  01-09-2007, 10:33 AM 25655 in reply to 25645

    Re: <p> vs <span>

    >>Do I need to enclose the span tag with the p tag?
     
    No.
     
     
    The following format is good enough:
     
    <div id="EditLayer4" contentEditable=false unselectable="ON" align="left" 
      style="position:absolute; overflow:hidden; display:none; z-index:11; border:1px #ccc dotted; left:40px; top:10px; width:120; height:110;">
     <span style="FONT-SIZE: 12pt; FONT-FAMILY: Georgia">Edit this</span>
     <span style="FONT-SIZE: 16pt; FONT-FAMILY: Georgia">....content....</span>
    </div>
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

View as RSS news feed in XML