The Code of Canon Law says:
Canon 1247 On Sundays and other holydays of obligation, the faithful are obliged to assist at Mass. They are also to abstain from such work or business that would inhibit the worship to be given to God, the joy proper to the Lord’s Day, or the due relaxation of mind and body.
Canon 1248 §1 The obligation of assisting at Mass is satisfied wherever Mass is celebrated in a catholic rite either on a holyday itself or on the evening of the previous day.
§2 If it is impossible to assist at a eucharistic celebration, either because no sacred minister is available or for some other grave reason, the faithful are strongly recommended to take part in a liturgy of the Word, if there be such in the parish church or some other sacred place, which is celebrated in accordance with the provisions laid down by the diocesan Bishop; or to spend an appropriate time in prayer, whether personally or as a family or, as occasion presents, in a group of families.