Open In App

Primer CSS Heading Utilities

Improve
Improve
Like Article
Like
Save
Share
Report

Primer CSS is a free open-source CSS framework that is built upon systems that create the foundation of the basic style elements such as spacing, typography, and color. This systematic method makes sure our patterns are steady and interoperable with every other. Its approach to CSS is influenced by Object-Oriented CSS principles, functional CSS, and BEM architecture. It is highly reusable and flexible. It is created with GitHub’s design system.

Primer CSS Heading Utilities is used to change the font size and font weight of an element on the marketing pages. We can use the classes from h0-mktg to h6-mktg to change the font size and weight. In this article, we will discuss Primer CSS Heading Utilities.

Primer CSS Heading Utilities Classes:

  • h*-mktg: The classes vary from h0 to h6 to change the font size and weight.

Syntax:

<p class="h*-mktg">
      ...
</p>

Example 1: The following example demonstrates the Primer CSS Heading Utilities using h0-mktg, h1-mktg, and h2-mktg classes.

HTML




<!DOCTYPE html>
<html>
    
<head>
    <title> Primer CSS Heading Utilities </title>
    <link rel="stylesheet" 
          href=
"https://unpkg.com/@primer/css@^18.0.0/dist/primer.css"/>
</head>
  
<body class="m-2">
    <div class="text-center">
        <h1 class="color-fg-success"> GeeksforGeeks </h1>
        <h3> Primer CSS Heading Utilities </h3> <br>
          
        <p class="h0-mktg">
            GeeksforGeeks 0
        </p>
  
        <p class="h1-mktg">
            GeeksforGeeks 1
        </p>
  
        <p class="h2-mktg">
            GeeksforGeeks 2
        </p>
    </div>
</body>
  
</html>


Output:

Primer CSS Heading Utilities

Example 2: The following example demonstrates the Primer CSS Heading Utilities using h3-mktg, h4-mktg, h5-mktg, and h6-mktg classes.

HTML




<!DOCTYPE html>
<html>
    
<head>
    <title> Primer CSS Heading Utilities </title>
    <link rel="stylesheet" 
          href=
"https://unpkg.com/@primer/css@^18.0.0/dist/primer.css"/>
</head>
  
<body class="m-2">
    <div class="text-center">
        <h1 class="color-fg-success"> GeeksforGeeks </h1>
        <h3> Primer CSS Heading Utilities </h3> <br>
          
        <p class="h3-mktg">
            GeeksforGeeks 3
        </p>
  
        <p class="h4-mktg">
            GeeksforGeeks 4
        </p>
  
        <p class="h5-mktg">
            GeeksforGeeks 5
        </p>
  
        <p class="h6-mktg">
            GeeksforGeeks 6
        </p>
    </div>
</body>
  
</html>


Output:

Primer CSS Heading Utilities

Reference: https://primer.style/css/utilities/marketing-type#heading-utilities



Last Updated : 25 Apr, 2022
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads