This forum is now read-only. Please use our new forums! Go to forums

0 points
Submitted by DANNY KHOURY
almost 11 years

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?

Answer 5159c88749f2b4fcb8000182

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. :-)

points
Submitted by boring12345
almost 11 years

2 comments

DANNY KHOURY almost 11 years

Thanks a lot! It was very clear and helpful.

boring12345 almost 11 years

You are welcome! :-)

Answer 515ae16cad1b2e87ff00195b

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.

points
Submitted by Stefan Bergh
almost 11 years

1 comments

Tiran B almost 11 years

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.

Answer 5488b4b586f552510300023b

0 votes

Permalink

,
points
Submitted by Joel.Miles925
over 9 years

1 comments

Joel.Miles925 over 9 years

Sorry…don’t know what happened there.