Читать книгу Professional WordPress Plugin Development - Brad Williams - Страница 107

Headings

Оглавление

WordPress has custom styles available for all heading tags. Now look at how those heading tags display:

<?php function pdev_styling_settings() { ?> <div class="wrap"> <h1>My Plugin</h1> <h2>My Plugin</h2> <h3>My Plugin</h3> <h4>My Plugin</h4> <h5>My Plugin</h5> <h6>My Plugin</h6> </div> <?php } ?>

Each heading is slightly smaller than the previous, as shown in Figure 3‐8. The main heading should always be an <h1>, and any subsequent headings should (likely) be bumped one level up. There should be no skipped levels. This is important for accessibility support as most screen readers will start with the <h1> tag and progress down from there.


FIGURE 3‐8: Heading levels

Professional WordPress Plugin Development

Подняться наверх