Can I implement a text viewer with php or javascript?

Hello, I’m making a novel homepage, and I want to create a viewer of content, but I’m trying to implement the viewer without using slides to put background music. Is there a simple txt viewer in php or javascript?