HTML style | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

HTML style

What is the difference If I give the html tag itself style e.g: <style> html { font-size:16px; } </style> or give the same style to the body tag. > Is it correct to give the html tag ( <html> ) style ? and how the style will be applaied.??

6th May 2019, 9:02 AM
Aya Habeeb
Aya Habeeb - avatar
6 Answers
+ 11
The <html> tag tells the browser that this is an HTML document. The <html> tag represents the root of an HTML document. The <html> tag is the container for all other HTML elements (except for the <!DOCTYPE> tag). In the video he put it <html lang=“en”> that means that the whole html document is im english. Is that what you want? https://developer.paciellogroup.com/blog/2016/06/using-the-html-lang-attribute/
9th May 2019, 2:12 AM
JTLZ
+ 8
<html> tag is the root of the whole html document. You cannot change the style. The tag do not display in the output.
9th May 2019, 12:21 AM
JTLZ
9th May 2019, 4:58 AM
Janning⭐
Janning⭐ - avatar
0
html cannot be styled but there does exist a container for body, it is a pseudo element referenced by :root see this Q&A for details: https://www.sololearn.com/discuss/1672632/?ref=app
6th May 2019, 3:14 PM
Gordon
Gordon - avatar
0
https://youtu.be/T7PnWnTgusc in this tutorial he add style to html tag, I'm confused : / ⚜️JTLZ⚜️[#Never Give Up!] Gordon
9th May 2019, 1:36 AM
Aya Habeeb
Aya Habeeb - avatar
0
I know that, but see the video in 28:20m please. you will understand what I mean ⚜️JTLZ⚜️[#Never Give Up!] Exam Going On :(
9th May 2019, 4:00 AM
Aya Habeeb
Aya Habeeb - avatar