Html first page question | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Html first page question

Good day time! In lesson this code <html> <head> </head> <body> This is a line of text. </body> </html> runs only text 'This is a line of text.' But when i do it (copypaste to textedit, save as html, than open with safari myself, on the screen i see ALL this code, not only text *This is a line of text*. Why?

11th Apr 2018, 10:07 AM
Arthur P
Arthur P - avatar
3 Answers
+ 1
I describe how i solve it. Maybe some of you will face the same problem. I used Safari and Chrome - no matters. I used "textEdit", "cotEdit", "open office" and some other editors - same thing. It runs normally only when i copy pasted code to "visual studio code editor" save it, then it runs ok
11th Apr 2018, 11:51 AM
Arthur P
Arthur P - avatar
0
I don't know about HTML, but for Python I have experienced, that solving problems is easy, if you make explanation comments foreach line of code and if you can't explain a line or fix an error, you have to keep learning.
11th Apr 2018, 10:33 AM
Seb TheS
Seb TheS - avatar
0
I don't know about safari. But your code looks okay. You should use chrome instead. Or maybe safari only works with HTML5. I don't know surely. Make sure your file extension is .html not .html.txt You might want to check the properties.
11th Apr 2018, 11:41 AM
Akib
Akib - avatar