Either choice is correct. Underlining is a tool used in typed material; however, when the capability exists to italicize (as with word processing), the use of italics for titles of books and magazines is preferred.