Open In App

Primer CSS Markdown

Primer CSS is a free open-source CSS framework built with the GitHub design system to support the broad spectrum of Github websites. It creates the foundation of the basic style elements such as spacing, typography, and color. This systematic method makes sure that 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 a highly reusable model.

Markdown is a lightweight markup language for creating formatted text. In this article, we will learn about the markdown with Primer CSS.



List of elements with their syntax:

<p> This is a paragraph </p>
<b>...</b>
<s>...</s>
<i>...</i>
<a href="#">... </a>
 <blockquote>... </blockquote> 
  <h1> Header 1 </h1>
  <h2> Header 2 </h2>
  <h3> Header 3 </h3>
  <h4> Header 4 </h4>
  <h5> Header 5 </h5>
  <h6> Header 6 </h6>
  <ul>
   <li>...</li>
   <li>...</li>   
 </ul>
  <ol>
   <li>...</li>
   <li>...</li>  
 </ol>
 <table>
       <thead>
         <tr>
           <th>heard 1</th>
           <th>header 2</th>
         </tr>
       </thead>
       <tbody>
         <tr>
           <td>table cell 1</td>
           <td>table cell 1</td>
         </tr>
         <tr>
           <td>table cell 2</td>
           <td>table cell 2</td>
         </tr>
         <tr>
           <td>table cell 3</td>
           <td>table cell 3</td>
         </tr>
       </tbody>
 </table>

Note: 



<input type="checkbox" checked>
<pre>...</pre>
<thread>... </thread>
<img src="#">
<section>...</section>

Example 1: In the below example, we have made use of paragraph and header elements.




<!DOCTYPE html>
<html>
  
<head>
    <title> Primer CSS | Markdown </title>
    <link href=
"https://unpkg.com/@primer/css@^19.0.0/dist/primer.css"
    rel="stylesheet" />    
</head>
  
<body>
    <div class="markdown-body">
        <center>
            <h1 class="color-fg-success"> GeeksforGeeks </h1>
            <h3> Primer CSS | Markdown </h3><br>
            <p>This is a paragraph</p>
   
        </center>
    </div>
</body>
</html>

Output:

Primer CSS Markdown

Example 2: In the below example, we have made use of the list element.




<!DOCTYPE html>
<html>
<head>
    <title> Primer CSS Markdown </title>
    <link href=
"https://unpkg.com/@primer/css@^19.0.0/dist/primer.css"
    rel="stylesheet" />    
</head>
<style>
    h1{
        color:green;
    }
</style>
  
<body>
     <div class="markdown-body">
        <center>
            <h1 class="color-fg-success"> GeeksforGeeks </h1>
            <h3> Primer CSS | Markdown </h3><br>
        </center>
        <h4>Unordered list</h4>
        <ul>
            <li>DBMS</li>
            <li>OS</li>
            <li>CN</li>
        </ul>    
    </div>
</body>
</html>

Output: 

Primer CSS Markdown

Reference Link: https://primer.style/css/components/markdown


Article Tags :