'Stylesheet for single object

I have a HTML page with a stylesheet linked in the head tag. I want to make an object with animations, and instead of using the original stylesheet for the animation code I would like to have a seperate stylesheet for that object only (for testing animations and to save space in the orig. stylesheet). That object would need to obey margin rules on the orignal page, only the animations and simple css would go in the seperate stylesheet.

Is this possible, if so, what do I type to link the stylehseet to the object?

My idea is to have a div to test animations on.



Solution 1:[1]

<link rel="stylesheet" type="text/css" href="YOURNEWSTYLESHEET.css">

Replace your new style sheet with whatever you want to call it and then you can link it in your primary HTML document like that by putting it in your head. You can link more than one CSS file in your HTML

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1