DEV Community

Discussion on: Do you think the differences between HTML and XHTML are generally well-understood?

Collapse
 
ben profile image
Ben Halpern

Hmmmm JSX is typically described as more or less aligned with XHTML, but yes it's its own beast. Perhaps I'm leaning too much on the early suggestions from the React folks to think XHTML, and maybe it's not as much of a talking point these days.

As an aside, do you type <br> or <br/> if you use that element in HTML? Just curious.

Collapse
 
coolgoose profile image
Alexandru Bucur

I typed
for a long time, I still refuse to not type selected="selected" old habits die hard I guess.

Thread Thread
 
ben profile image
Ben Halpern

This is a classic markdown-attempt-to-write <br/> 😄

Thread Thread
 
coolgoose profile image
Alexandru Bucur

I should give one beer for each markdown error :))

Collapse
 
andre profile image
André König

JSX is more inspired by an obsolete standard called E4X which in fact uses JS for processing XML. So in that sense it is indeed XHTML, but just because of the fact of processing XML. I don‘t think that the React team focused on XHTML because they thought it should be pushed, but this is just my opinion 😊