0
I missed 1 question in a code challenge today. When using inline styling in HTML, do we call that style tag or style attribute?
The question was: "The <style> tag can be placed in...?" It had following answers: a. Only <body> b. Both <body> & <head> c. Only <head> d. None of the mentioned tags My choice was (C) & when i reviewed the answers i found out that the answer is option (B). Help me understand.
6 Respuestas
+ 2
The <style> tag is typically placed in the <head> section of an HTML document.
However, the <style> tag can also be used inline, by placing it directly inside an HTML element's opening tag.
were you looking for this?
+ 1
Yes, as snehil said, you can place <style> tag in the body. Try to put style in the body yourself to see that it works.
0
So when we put style tag inside body is it still called inline or internal?
0
When it is placed in the body it is called an inline style.
There are 3 types of styles.
Inline - by using the style attribute inside HTML elements
Internal - by using a <style> element in the <head> section
External - by using a <link> element to link to an external CSS file
Example inline:
<h1 style="color:blue;">A Blue Heading</h1>
0
Alright thank you