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,299 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.