Press the arrow keys to move the Knight around. Press A and S to swing the sword left and right. Press Q and W to raise the shield left and right. The dragon can only harm you with its breath weapon, and after it breathes fire it needs a break before doing so again. Your shield will block the fire.
This is a fairly simple fantasy-themed combat game. My ultimate goal is to use something like this as a boss level of a dungeon crawl. The soundtrack is my interpretation, on mandolin, of the battle music from the classic computer game Ultima IV.