Is Toronto the capital of Ottawa?

No, both are cities. Ottawa is the capital of Canada and Toronto is the capital of the province of Ontario.