This forum is now read-only. Please use our new forums at discuss.codecademy.com.

HTML Basics Forum

View Course » View Exercise

30 points
Picture
Submitted by
DANNY KHOURY
over 4 years ago

What other tags can go in <head> other than <title>?

and what about the text written in Head outside Title element? it also appears...

and why do we need Body element if what we've written outside Body element shows the same thing?


4 votes

permalink

Hello,
you can put <link>, <script> and <meta> elements in your head: The first ones link to other stylesheets and scripts and the last one provides some information about the webpage.
Although it will work, if you put elements outside, nobody can ensure it will be working. Currently the major browsers support it, but they don't have to, as it is not the standard.
Furthermore errors in your code will lead to errors on the webpage, so try to avoid errors. ;-)
I hope it helps. :-)

3108 points
5154c6cf115b457ac9000021_667301409
Submitted by
boring12345
over 4 years ago

2 Comments

Picture DANNY KHOURY over 4 years ago

Thanks a lot! It was very clear and helpful.

5154c6cf115b457ac9000021_667301409 boring12345 over 4 years ago

You are welcome! :-)


1 vote

permalink

The <style> tag is also used in the head. It allows styling with CSS to be done without using an external CSS file. Some web-developers prefer it, many others think you should use an external file. Unless you work for a company, it doesn't matter all that much.

898 points
49a5ed9b82beb2f0a5aab536376ab23b?s=140&d=retro
Submitted by
Stefan Bergh
over 4 years ago

1 Comment

517052f7082bfc5d68002207_513563640 Tiran B over 4 years ago

It would matter if the same stylesheet is used throughout your site. Then you want to make sure it's defined externally so that any changes made to the css is applied globally to the site.


0 votes

permalink

,,, and others can be used in the head.

1210 points
Fb6f13fcbef596b703d337caf56196d0?s=140&d=retro
Submitted by
Joel.Miles925
over 2 years ago

1 Comment

Fb6f13fcbef596b703d337caf56196d0?s=140&d=retro Joel.Miles925 over 2 years ago

Sorry...don't know what happened there.