From the course: Build Modern Web Apps with React, Hooks, State Management, and APIs Using Vite or Next.js

Unlock this course with a free trial

Join today to access over 25,200 courses taught by industry experts.

Differences from HTML

Differences from HTML

Hi and welcome back. In this video, we'll discuss JSX versus. Beside being very close to JSX has some differences. Mostly the differences are for the attribute names. For example, class. As we know that in javascript class is a reserved keyword but for html it is used to define the css classes. So, when you are writing gsx you have to use name instead which is in camel case convention. Another example is which we use to define for our html labels. Instead of that, we use HTML4. Then we have self-closing tags available. Let me give you a quick example of that. So far, the elements we have defined are all contained inside the starting and the closing brackets. Let me define an other element here and over here I'm going to define a p tag. Let's define a button and as you can see, this button is defined and it's not giving us any error and this is a self-closing tag button. In HTML, you have to define your button like this above. There should be a starting tag and a ending tag containing…

Contents