This forum is now read-only. Please use our new forums! Go to forums
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
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. :-)
Answer 515ae16cad1b2e87ff00195b
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.
1 comments
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
1 comments
Sorry…don’t know what happened there.
Popular free courses
- Free Course
Learn SQL
In this SQL course, you'll learn how to manage large datasets and analyze real data using the standard data management language.Beginner friendly,4 LessonsLanguage Fluency - Free Course
Learn JavaScript
Learn how to use JavaScript — a powerful and flexible programming language for adding website interactivity.Beginner friendly,11 LessonsLanguage Fluency - Free Course
Learn HTML
Start at the beginning by learning HTML basics — an important foundation for building and editing web pages.Beginner friendly,6 LessonsLanguage Fluency
2 comments
Thanks a lot! It was very clear and helpful.
You are welcome! :-)