Codes and conventions are used in opening title sequences to signal the genre of the film to viewers and set expectations. Common codes include explosions for action films and deaths for horror films. Conventions like introducing main characters and setting help viewers identify the genre. The purpose is to provide the first impression, draw the audience in, and introduce key elements to strengthen their interest in the film.