ALGIERS - An Algerian blogger has been detained for posting cartoons on the Internet mocking President Abdelaziz Boutelifka, and is due to stand trial for "contempt" and "defending terrorism", his lawyer said Wednesday.