On Feb 25, 7:52 pm, Budulai <[email protected]> wrote:
> i was inspecting one of my pages and i observed that firebug was
> transforming code
>
> from this :
> <p class="my_class"/>
> some text
>
> to this:
> <p class="my_class">
> some text
> </p>
>
> and the class "my_class" was applying to all the text

Firefox has transformed invalid (X)HTML into valid (X)HTML.

The "/>" sequence is meaningless in HTML.
In XHTML it is permitted ONLY FOR EMPTY ELEMENTS (such as 'br' and
'img'). It is illegal for elements that are not defined as empty.

"All elements other than those declared in the DTD as EMPTY must have
an end tag. Elements that are declared in the DTD as EMPTY can have an
end tag or can use empty element shorthand" [1]

If you really want an empty <p> you need to use <p></p>

[1]http://www.w3.org/TR/2002/REC-xhtml1-20020801/#h-4.3

Colin


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Firebug" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/firebug?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to