I know that you can have CSS on External Files, using a <style> tag on the page <head> and inline using style="something here">
My question is… is it allowed the have a tag with styles in the <body> or just the <head> ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes it is allowed, and it applies to the whole page. It’s just not encouraged.
It’s wise to load the stylesheet very quickly so that content is styled when it appears on the screen. This is called a flash of unstyled content and putting the
<style>tag in the head where it’s one of the first things parsed by the browser usually avoids it.But, for example, if you wanted to embed a
<style>tag on a page whose content you got from an ajax request, it would take visual effect immediately no matter where it was placed.