Code & Technical Text Tags

1. Inline Code (<code>)

Use the <p> tag to create a paragraph.

In JavaScript: console.log("Hello");


2. Keyboard Input (<kbd>)

Press Ctrl + C to copy.

Press Ctrl + V to paste.

Save with Ctrl + S.


3. Sample Output (<samp>)

Program output: Build successful. 0 errors.


4. Variable (<var>)

Area of a circle: π × r2

Simple interest: P × R × T / 100


5. Preformatted Code Block

<!DOCTYPE html>
<html>
    <head>
        <title>My Page</title>
    </head>
    <body>
        <h1>Hello World</h1>
    </body>
</html>

6. Combined Example (kbd + samp + code)

Type git status and you'll see:

On branch main
nothing to commit, working tree clean