Following this question, i got confused. I saw people saying that react uses html, and people saying it uses jsx, but people dont mention which type of html it uses.
Here is the question i followed:
Does ids must start with a letter in react?
Could somebody clarify?
JSX stands for JavaScript XML, which you could say is a more powered up version of Vanilla Javascript. In the end JSX is compiled by preprocessors to Javascript (ES5). React uses JSX for rendering html and performing other actions, but you don't need to use JSX if you're not too comfortable with it. You may use vanilla JS as well.
As for whether it mimics HTML4 or HTML5, it depends on what you code, React itself is not limited to any HTML version and it is the browser that needs to worry about which HTML version you are using.
If your document has
<!DOCTYPE html>
browsers would recognise your document as HTML5. If you instead use
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
browsers would recognize the document as HTML4 (strict in this case)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With