Java code block

class Human
{
    /**
     * The human's age.
     */
    private int age;
    
    public Human() { this.age = 0; }
    
    public void birthday()
    {
        // Increment age by 1;
        this.age++;
        System.out.printf("Happy Birthday! you are now %i years old", this.age);
    }
}

HTML code block

(with caption text)

<!DOCTYPE html>
<html>
    <head></head>
    <body>
        <h1>Hello World!</h1>
        <p>This is a paragraph</p>
    </body>
</html>

Inline Code

The <code> tag is a phrase tag. It defines a piece of computer code. Most browsers will display the <code> element with the CSS value font-family: monospace;

Custom Starting Line

(with caption text)

<?php
class Idea extends Eloquent {
	/**
	 * Dreaming of something more?
	 *
	 * @with  Laravel
	 */
	 public function create()
	 {
	 	// Have a fresh start...
	 }
}

 

Hidden code block

<?php
class Idea extends Eloquent {
	/**
	 * Dreaming of something more?
	 *
	 * @with  Laravel
	 */
	 public function create()
	 {
	 	// Have a fresh start...
	 }
}

 

Line highlighting

(highlighting lines 3-5)

<!DOCTYPE html>
<html>
    <head></head>
    <body>
        <h1>Hello World!</h1>
        <p>This is a paragraph</p>
    </body>
</html>

 

Spread the word about Mivhak!