Sure, I can help you create a simple game with a sword using HTML and JavaScript. Here's an example implementation:
When you open this HTML file in a web browser, you'll see a blue square representing the player and a gray rectangle representing the sword. You can touch and drag the sword to move it around the screen.
This is a very basic example, but you can expand on it by adding enemies, score tracking, and more complex gameplay mechanics. Remember to save the file with a .html extension and open it using a web browser to play the game.