A magnitude 5.6 earthquake shook buildings in Taiwan on Thursday morning as a series of shocks hit the island, causing little damage but possibly portending more seismic activity in the near future.