In English, where should you place periods and question marks used in dialogues?

Periods and question marks in dialogues should always be placed inside the quotation marks. For example:

- She said, "I'll see you tomorrow."
- "What time will you arrive?" he asked.

the opening or closing question marks?

The opening question mark should always be placed inside the quotation marks or before the quoted text in dialogues, while the closing question mark should be placed inside the closing quotation marks. For example:

- Did she say, "I'll be there at 5 o'clock"?
- "What are you doing tonight?" she asked.