How to manage mobs for dungeons

Target selectors use square brackets and = to separate keys from values. So your kill command should be:

kill @e[tag=dungeon]

In NBT, these tags are stored in a list called Tags. So your summon command should be:

summon Zombie ~ ~ ~ {Tags:["dungeon"]}

Also, the main convenience of using tags (rather than scores) is that you don't have to create a scoreboard objective. So you can remove the dungeon1 objective if you want.


As an addition, note that since Tags in NBT is a list of strings, you could summon the zombie with multiple tags like this, if you wanted to:

summon Zombie ~ ~ ~ {Tags:["dungeon","boss_zombie","strong"]}