Markdown Syntax And URL Syntax

Describe the Markdown Syntax and URL syntax in detail.

Markdown Syntax

1![alt](url [caption])
  • !: must starts with a exclamation mark.
  • alt: alternative text.
  • url: the image URL.
  • caption: image caption shown below the image, optional.

URL Syntax

1URL = [scheme ":" "//"] path ["?" query] ["#" fragment]
  • scheme: http or https, required for external images.
  • path: the path name of images.
  • query: the query string preceded by a question mark (?), which is ampersand-separated (&) key-value pairs, such as foo=bar&fizz=buzz.
  • fragment: the fragment ID preceded by a hash (#).

Example

Example
Example caption
For example, ![Example](/images/great-wall.jpg?crop=300x120&brightness=-30#float-end "Example caption"), where

  • Example represents the alternative text.
  • The path is /images/great-wall.jpg.
  • The query is crop=300x120&brightness=-30 to crop the image in size 300x120, change the brightness as -30.
  • The fragment is float-end to float the image to the end (right).
  • Example caption represents the caption shown below the image.