CSS animations is the recommended method, as they are becoming part of the official CSS specifications (whereas, the <marquee> tag is not actually part of the official HTML specification).
Note: Due to the nature of slide-in text, you may need to refresh this page several times to catch all of the examples. This is because, once the text has slid in, it stops. If you don’t see it slide in, you’ve missed it… unless you reload the page!
The <marquee> tag has been supported by the major browsers for a long time now. Despite this, it has never made it into an official HTML specification. Therefore if you use the <marquee> tag, you won’t be able to validate your document as valid HTML.
Furthermore, HTML is not the right place for specifying marquees and animations. HTML (especially from HTML5) is more concerned with the semantics of the elements on the page. Marquees and animations are more suited to CSS. Therefore, CSS is the recommended technology to use when creating slide-in text or other marquee-type effects.
See CSS marquees for more about using CSS to create marquee effects.
More Marquee Codes
You can do much more with HTML marquees than is covered on this page. Here’s the full list of marquee codes on this website: