GitHub: edutechtammy

Component Test Code Styling Test


<figure>
   <figcaption style="padding: 10px 20px 5px 20px; font-size: 10px">This is a caption</figcaption>
   <pre>
      <code style="background-color: #eee; border: 1px solid #999; display: block; padding: 5px;">
      paste your code in here
      </code>
   </pre>
</figure>
          
This is a caption
      
      paste your code in here
      
   
← Back to Index

Inline Code Examples

Testing inline <code> elements within paragraphs of text. Use the display property to control layout. Variables like myVariable should be clearly visible.

Multiple code snippets in one line: function(), variable, className, and file.css.

Code with special characters: <div class="container"> and const x = 5;

Code Blocks

Example of a code block using <pre><code>:

function greet(name) {
    console.log("Hello, " + name);
    return true;
}

HTML example:

<div class="container">
    <h1>Welcome</h1>
    <p>This is a paragraph.</p>
</div>

CSS example:

.my-class {
    color: #1d2757;
    background-color: #f5f5f5;
    padding: 1rem;
    border-radius: 8px;
}

Code in Lists

Code elements within list items:

  1. First, import bootstrap.min.css
  2. Then add canvas-complete.css
  3. Finally include canvas-complete.js

Code in Tables

Code styling within table cells:

Property Value Description
display flex Creates a flex container
color #1d2757 TSTC primary blue
font-family 'Lato', sans-serif Primary font stack

Code in Callouts

Technical Note

When using display: flex, remember to set flex-direction to control the main axis. Use align-items: center for vertical centering.

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

Mixed Content

This paragraph contains bold text, italic text, inline code, and a link to test how code styling interacts with other text formatting.

You can also nest code within other elements: Use font-weight: bold for emphasis or apply font-style: italic for emphasis.