GitHub: edutechtammy
<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>
paste your code in here
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;
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 elements within list items:
display: flex for flexible layoutsposition: relative property for positioningmargin: 0 auto to center elementsbackground-color: #1d2757 for TSTC bluebootstrap.min.csscanvas-complete.csscanvas-complete.jsCode 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 |
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;
}
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.