Jump to content

How to put html and css in the same document


Daniele.G
 Share

Recommended Posts

Hi guys

I have uploaded a document with html and css in the file manager of my Wordpress blog.

The html is the image of horse and the css is used to turn the horse into a galloping horse.

Unfortunately, the code doesn't work on my blog as it does on codepen https://codepen.io/dannyku18/pen/yLYJXMV

I think the connection between html and css is missing. How can I make this code work?

Best,

Daniele

html and css in one file.png

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...

To include the CSS that you are using, use internal or external!

internal:

<!DOCTYPE html>
<html>
  <head>
    <style>
      /*CSS here*/
    </style>
  </head>
  <body>
  </body>
</html>

or external

<!DOCTYPE html>
<html>
  <head>
    <link href="style.css" rel="stylesheet" charset="utf-8">
    <!--Note - You don't have to use the charset, but I did it since I noticed you were using that enctype-->
    <!--You would then put the CSS in the file you created titled CSS-->
  </head>
  <body>
  </body>
</html>

 

Edited by Inquirer
Charset
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...