Website Hosting for Just 20 ForumCoin ~ Advertise on ForumCoin
52 Life Tips Banner
Webmaster forum. Website development, design & management. Graphic design. Blog / Forum Set-up, Management, Admin & News

HTML vs. JSX

Postby GuestHu » 24 May 2021, 03:55

HTML means Hypertext Markup Language. It’s a set of codes intended for display on the internet. It tells the browsers how to display a web page’s words and images and it is supported by all browsers. Whereas, JSX means JavaScript Syntax Extension or JavaScript XML. This extension allows developers to write HTML within JavaScript and requires a compiler like Babel or Webpack to translate JSX into JavaScript that the browsers understand.
In HTML, you can insert any element anywhere and it does not need to inside a parent element, unlike in JSX. It will throw an error if a line of HTML tags is not inside the parent element or fragment (<></>). Plus, HTML can self-close the elements without slash. The <br /> works the same as <br>, however, in JSX, slash must be included because it heavily relies on HTML 4 syntax.
Also, in creating a class component, HTML uses the keyword class while JSX uses className. When it comes to inserting inline css in HTML, the style attributes are inside the “” (“color: red; font-size: 12px;”) while JSX uses an object format: {{ color: “red”, fontSize: “12px” }}

People prefer JSX because it reduces redundancy and able to code faster than using HTML and Javascript.
  • 1

User avatar
GuestHu
 
Posts: 1,402
ForumCoin: 749

Re: HTML vs. JSX

Postby chikitta » 24 May 2021, 14:37

Those are some good insights though i don't think i have never use the jsx just got to know about it now, thanks for sharing.
  • 0

chikitta
 
Posts: 5,050
Referrals: 1
ForumCoin: 354

Re: HTML vs. JSX

Postby mrki444 » 24 May 2021, 21:29

I hear for JSX for I never studied it. I still on most free templates see clear HTML and not JSX. Is JSX present in NodeJS or React? Those platforms are based on Javascript.
  • 0

mrki444
 
Posts: 29,585
Location: Croatia
Referrals: 1
ForumCoin: 1,202

Re: HTML vs. JSX

Postby GuestHu » 28 May 2021, 07:59

mrki444 wrote: JSX present in NodeJS or React?

It's typically used in ReactJS, because JSX is used to manipulate DOM elements and ReactJS is a tool for front-end development.
  • 0

User avatar
GuestHu
 
Posts: 1,402
ForumCoin: 749

Re: HTML vs. JSX

Postby ptrikha21 » 13 Jun 2021, 10:43

Some of my friends might be learning JSX. I remember that some 10 years ago, Ajax was in a lot of favor.
Now it is Angular and React JS.
  • 1

User avatar
ptrikha21
 
Posts: 7,387
Location: India
Referrals: 5
ForumCoin: 1,113

Re: HTML vs. JSX

Postby GuestHu » 16 Jun 2021, 13:42

ptrikha21 wrote: Angular and React JS

It performs better and helps programmers develop an app or site quickly than using Ajax and Jquery. Those are becoming obsolete.
  • 0

User avatar
GuestHu
 
Posts: 1,402
ForumCoin: 749

Re: HTML vs. JSX

Postby ptrikha21 » 18 Jun 2021, 15:12

GuestHu wrote:
ptrikha21 wrote: Angular and React JS

It performs better and helps programmers develop an app or site quickly than using Ajax and Jquery. Those are becoming obsolete.


Even Angular is evolving from what other tell me.
  • 0

User avatar
ptrikha21
 
Posts: 7,387
Location: India
Referrals: 5
ForumCoin: 1,113



Your Ad Here.

Return to Webmaster Questions, Discussion & News



Who is online

Users browsing this forum: Claude [Bot] and 0 guests

Reputation System ©'