Pallaveechaubey / React

0 stars 0 forks source link

what are html attributes #10

Open monavariyas opened 7 months ago

monavariyas commented 7 months ago

Correct the spelling

But in react we use 'classnamw' attribute insted of class.

Lets take another example of onclick event in html in html we use "onclick in all lower case but in reacr we use camel case like 'onClick " . also in html we have to put the function in quotes and have to invoke it putting parametrs but in react we use curly braces and the fu7nction name without parenthesis.

In html a "label" is an ewlement that can be used to privide a text description fior a form elemtnts such as text field or a checkbox. The "for" attribuites of the label elements is used to associated the label. With specific form elemtnts typically by specifying the ID the form element. In rect a "label" components can be created using javascript and jsx to create and style a label elements. This components can be reusable and can be used in different parts of application.

Write we as We, in as In Also correct spelling

NOTE-- we already know there are cartain different between html and jsx and one such difference that we have seen in htmlFor . in normall html we have for but we cannot use it in javascript since it is a reserved keywoed in javascript so we use htmlFor in jsx.

Pallaveechaubey commented 7 months ago

Ma'am, I corrected all the spellings.