---
title: "Discussion on \"React Lesson #4 - Inline Styling for React Elements\" | Hashnode"
description: "Discussion on \"React Lesson #4 - Inline Styling for React Elements\". We normally write inline CSS like this:\n<h1 style=\"color: red\"> Hello World </h1>\n\nBut, in JSX we cannot write it like this since a lot of things are happening on the background. It will give an error saying that we are trying to pass a string.\n\nJSX ..."
url: "https://hashnode.com/posts/react-lesson-4-inline-styling-for-react-elements/66126f836ca765852941b972"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [React Lesson #4 - Inline Styling for React Elements](https://ratansharma.co.in/react-lesson-4-inline-styling-for-react-elements?utm_source=hashnode&utm_medium=feed)

We normally write inline CSS like this: <h1 style="color: red"> Hello World </h1> But, in JSX we cannot write it like this since a lot of things are happening on the background. It will give an error saying that we are trying to pass a string. JSX ...

Apr 7, 2024 · 2 min read · ratansharma.co.in  
Read the article

-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#javascript-framework](https://hashnode.com/tag/javascript-framework)
-   [#nodejs](https://hashnode.com/tag/nodejs)
-   [#web-development](https://hashnode.com/tag/web-development)
-   [#frontend-development](https://hashnode.com/tag/frontend-development)

## Written by

[Ratan Sharma](https://hashnode.com/@rat211)

@rat211 · Mumbai, India

  
[View profile](https://hashnode.com/@rat211)

Student

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
