To use HTML5 semantic elements, you need to follow some basic rules and best practices. First, you need to declare the HTML5 doctype at the beginning of your document: <!DOCTYPE html>. This tells the browser that you are using HTML5 standards. Second, you need to choose the appropriate semantic element for each part of your web page, based on its meaning and function. For example, you can use <header> for the top part of your page that contains your logo and navigation, <section> for each independent part of your content, <article> for each self-contained piece of information, and <footer> for the bottom part of your page that contains your copyright and links. Third, you need to nest your semantic elements correctly, and avoid overlapping or mixing them. For example, you can have multiple <section> elements inside a <main> element, but not a <main> element inside a <section> element.