Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![cloud712](https://uploads.teamtreehouse.com/production/profile-photos/11559391/micro_20200820_144413.jpg)
cloud712
7,616 Pointscode compiles but html elements are not displayed. something wrong with render?
Looking for debugging help! My code compiles but the page is blank.
I'm on Windows 10 and using Visual Studio Live Server. Ty in advance!
Here's my code:
app.js
const title = <h1>My First React Element!</h1>;
const desc = <p>I just learned how to create a React node and render it into the DOM.</p>;
const header = React.createElement(
'header',
null,
title,
desc
);
ReactDOM.render(
header,
document.getElementById('root')
);
index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Scoreboard</title>
<link rel="stylesheet" href="./app.css" />
</head>
<body>
<div id="root"></div>
<script crossorigin src="https://unpkg.com/react@16/umd/react.development.js"></script>
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script>
<script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>
<script type="text/bable" src="./app.js"></script>
</body>
</html>
2 Answers
![Robert Manolis](https://uploads.teamtreehouse.com/production/profile-photos/1167622/micro_me.jpg)
Robert Manolis
Treehouse Guest TeacherHi cloud712, thanks for the share. Looks like the main problem was that your JS file wasn't hooking up with the HTML because of the following code on line 15 of the index.html file.
<script type="text/bable" src="./app.js"></script>
In the type attribute above, "babel" is misspelled.
![Robert Manolis](https://uploads.teamtreehouse.com/production/profile-photos/1167622/micro_me.jpg)
Robert Manolis
Treehouse Guest TeacherHi cloud712, I can't tell what's wrong by looking at those snippets. But if you share a workspace snapshot or a GitHub repo link, then I could run the code locally and perhaps be able to locate the problem and point you in the right direction.
![cloud712](https://uploads.teamtreehouse.com/production/profile-photos/11559391/micro_20200820_144413.jpg)
cloud712
7,616 PointsRobert Manolis does this work? https://github.com/kristten712/treehouse_react
cloud712
7,616 Pointscloud712
7,616 Pointsomg 🤦 thank you so much hahaha