In English where should you place periods and questionmarks used in dialogue

In English, periods and question marks used in dialogue should be placed inside the quotation marks. For example:

"I love reading books," she said.

"Have you finished the book yet?" he asked.