Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript JavaScript Basics (Retired) Introducing JavaScript Your First JavaScript Program

Garland Settle
PLUS
Garland Settle
Courses Plus Student 41 Points

so what does <h1> </h1> means and how was I suppose to know i was suppose to put that in the code?

?

how to write them

4 Answers

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,538 Points

Hi Garland,

JavaScript, even the Basics course will still assume that you have a working knowledge of HTML as JavaScript is a language used to manipulate and provide functionality to a website (which is built using HTML).

If you are not familiar with the HTML tags (here the <h1>), I'm going to assume that you have no HTML experience. If that is correct, I strongly recommend you complete the Digital Literacy Track. Once that is complete, you could move to the Front-End Web Development Track, which will build on the HTML skills from the Digital Literacy Track and then move you into JavaScript.

If you jump straight into Javascript without knowing HTML, you will find it very confusing and probably frustrating, as it does expect you to know HTML. Following the above tracks will be the best way.

:dizzy: :)

Hi Garland,

The <h1> to <h6> tags are used to define HTML headings. <h1> defines the most important heading. So when you write 'document.write("<h1> Welcome to JavaScript Basics </h1>");' It's the biggest text the viewer will see.

Garland Settle
PLUS
Garland Settle
Courses Plus Student 41 Points

so what does <h1> </h1> means and how was I suppose to know i was suppose to put that in the code?

?

Thats correct, <h1> is the largest html text descending to <h6>, meaning the text will get smaller, but <h1> doesn't necessarily mean its the most important text.