Web Analytics Made Easy -
StatCounter <p> within a <p>?? - CodingForum

Announcement

Collapse
No announcement yet.

<p> within a <p>??

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • <p> within a <p>??

    how would i replicate this in CSS:

    Code:
    <p>This word is coloured <font color="#FF0000">red</font> and this is black</p>
    i was thinking of using something along the lines of:

    Code:
    <p class="1">This word is coloured <p class="2">red</p> and this is black</p>
    is that right?? or is there another tag that i have to use instead?
    My body's a temple... and like those ancient Greek ones it's a ruin
    sweenster.co.uk

  • #2
    You could use the <span> tag - or, possibly, the <strong> tag. Depends how you're going to use it.

    Comment


    • #3
      A p element may not include other block level elements, and that includes the p tag. As for the red colour, is there any reason for you to want it to be red? If so, try to find a matching tag. If not, span is the one to use.
      liorean <[[email protected]]>
      Articles: RegEx evolt wsabstract , Named Arguments
      Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
      Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

      Comment

      Working...
      X