0

why is the style tag put inside the head tag?

<head> <style> p {color:blue; }

7th Aug 2016, 3:42 AM
Chris Hebert
Chris Hebert - avatar
4 Respostas
+ 1
it is so because it is a embedded style of inserting the CSS in which Bus style is required to put in the header section of HTML page due to which the ST Amal recognises that there is any CSS content in HTML files after applying styles it will apply to all the elements for which they are inserted
7th Aug 2016, 5:04 AM
anubhav chanda
anubhav chanda - avatar
+ 1
the style in the head tag is not used. the body tag can be used. if your CSS file is somewhere else , if you use it externally between the head tag in the following manner.<file.DOCTYPE html> <html><head><rel="stylesheet" href="yourfile .css ></head></html> in other cases, the HTML is as follows . <!DOCTYPE HTML> <html><head></head> <body><style="text/css"></style></body></html>
7th Aug 2016, 9:02 AM
HawkEye
HawkEye - avatar
+ 1
the style is added to the head tag because it is the head tag where all the information about the document is given.anything given in head tag wiil not be dispayed same with the style tag .we use it in head to tell the browser about formatting of html document
8th Aug 2016, 5:40 PM
priyam chopra
priyam chopra - avatar
0
and style is available ! however, you can use like this. <style="color: your color , size: you want size">AND THIS YOUR TITLE IN HTML</style>
7th Aug 2016, 9:07 AM
HawkEye
HawkEye - avatar