+ 3

How to solve the issue tried to connect css to html but it's not working there is the code

<!DOCTYPE html> <html> <head> <title>Page Title</title> <style> p{ color:green; background:blue; } h1{ color:red; background:black; } </style> <link href="style.css" type="text/css" rel="stylesheet" </head> <body> <iframe src="https://100k.live"> </iframe> I AM HACKER WHAT IS THE UES OF CSS IS THE A </p> <br> <h1 style="color:red"> Hey Guys... <br> <p> I AN DREAM HACKER WHAT CAN I DO FOR YOU SIR PLEASE TELL ME SIR OK THT'S THE PROBLE I WILL SOLVE THIS WAIT A FEW MINUTE ' </p> <h1> HELLO HOW ARE YOU GUYS I AM FINE OK </h1> <br> <button> CLICK ME </button> </body> </html> THIS IS THE CODE OF CSS button { background:red; color:white; }

30th Sep 2020, 6:47 AM
d̷r̷e̷a̷m̷ ̷ h̷a̷c̷k̷e̷r̷
d̷r̷e̷a̷m̷ ̷ h̷a̷c̷k̷e̷r̷ - avatar
11 odpowiedzi
+ 3
d̷r̷e̷a̷m̷ ̷ h̷a̷c̷k̷e̷r̷ but how to do you want to connect a HTML file to an unknown css file?🤔🤔
30th Sep 2020, 6:57 AM
LIONEL
LIONEL - avatar
+ 3
d̷r̷e̷a̷m̷ ̷ h̷a̷c̷k̷e̷r̷ save the file with a name and then add .css e.g my stylesheet.css
30th Sep 2020, 6:58 AM
LIONEL
LIONEL - avatar
+ 3
d̷r̷e̷a̷m̷ ̷ h̷a̷c̷k̷e̷r̷ now I understand..😊 your problem....solo learn has css, HTML and js combined as one so there is no need for you to link them with script or link just continue your web code.... it is when you are using a code editor on phones and laptops that you will need to link the external files😀 e.g code editors like acode , spck, notepad ++ , visual studio 😀
30th Sep 2020, 7:03 AM
LIONEL
LIONEL - avatar
+ 2
in your code you have <link href = "style.css" type...> is style.css your stylesheet name ??
30th Sep 2020, 6:52 AM
LIONEL
LIONEL - avatar
+ 2
There is no stylesheet name
30th Sep 2020, 6:53 AM
d̷r̷e̷a̷m̷ ̷ h̷a̷c̷k̷e̷r̷
d̷r̷e̷a̷m̷ ̷ h̷a̷c̷k̷e̷r̷ - avatar
+ 2
How will we gave a name to style sheet
30th Sep 2020, 6:57 AM
d̷r̷e̷a̷m̷ ̷ h̷a̷c̷k̷e̷r̷
d̷r̷e̷a̷m̷ ̷ h̷a̷c̷k̷e̷r̷ - avatar
+ 2
I am doing this in the solo learn app then how will I do it in this app
30th Sep 2020, 7:00 AM
d̷r̷e̷a̷m̷ ̷ h̷a̷c̷k̷e̷r̷
d̷r̷e̷a̷m̷ ̷ h̷a̷c̷k̷e̷r̷ - avatar
+ 2
Just use : <link rel="stylesheet" href="style.css"> It will work! To verify, u can set a background color of the body in css to a see if there is a change!
30th Sep 2020, 7:34 AM
Rawley
Rawley - avatar
+ 1
I tried it in the next time without linking it but it's not working
30th Sep 2020, 7:08 AM
d̷r̷e̷a̷m̷ ̷ h̷a̷c̷k̷e̷r̷
d̷r̷e̷a̷m̷ ̷ h̷a̷c̷k̷e̷r̷ - avatar
30th Sep 2020, 7:15 AM
LIONEL
LIONEL - avatar
+ 1
Linking is used with external css page Like u have two file Index.html and mystyle.css Where you have css code in mystyle.css for index.html Use link tag as <link href="mystyle.css" rel="stylesheet" type="text/css" > If both r in same folder. No use of link tag if you r using inline or internal csd
30th Sep 2020, 9:34 AM
Divya Mohan
Divya Mohan - avatar