Skip to content

Web Markup Cheatsheet

cniallen edited this page Mar 2, 2020 · 16 revisions

Your Internet browser interpret the Hyper Text Markup Language, more known as its abbreviation HTML, using tags to format and display each Web page you see, as we use LaTeX to format scientific and technical documents. It is however difficult to read through raw HTML code, hence other lighter Web markup languages have emerged, most notably the passe-partout Markdown (of the GitHub Flavour: GFM) and reStructuredText enabling documentation generation straight from comments in your Python programs. The cheatsheet below selects commonalities between both to get your document more likely to process correctly on either type of software. Please use exactly this syntax to reduce, if not eliminate, time loss in converting your documents! When the syntax differs between Markdown and reStructuredText, we choose raw HTML tags, which should not significantly hinder readability and can usually be passed to the Web site generator.

Here be a table by Justine and/or Olivier for the most compatible cheatsheet between .rst .md with the corresponding HTML tags. See https://gist.github.com/dupuy/1855764 for a discussion of identities and differences Think about how to pass LaTeX as well to display equations, what's the name of the online software for that again, Mathjax? I think we should look into Pandoc (see links below) as well, as these developers have pondered document conversion for a long while and it might be insightful for our choice of syntax. Typora of DCôté promo, supports Pandoc integration for directly importing files from another format, but not including .rst at the moment :( However, it (Typora) supports nicely HTML tags http://support.typora.io/HTML/ going in the direction of what I’m trying to do here :) *

Markdown, reStructuredText & HTML Cheat Sheet :

Markdown, reStructuredText & HTML Cheat Sheet
Style Language Code Demo
Headers md & rST Combined
Section Title¶
=============¶
Subsection Subtitle¶
-------------------¶
Section Title
================
Subsection Subtitle
-------------------
Lists md & rST
*•Sizes¶
*•Shapes¶
*•Colours¶
⇥*•Blue¶
⇥*•Green¶
(Note : “*”, “-“ or “+”

can be used)

  • Sizes
  • Shapes
  • Colours
    • Blue
    • Green
1.•First¶
2.•Second¶
3.•Third¶
⇥1.•Alpha¶
⇥2.•Bravo¶
  1. First
  2. Second
  3. Third
    1. Alpha
    2. Bravo
Emphasis md & rST *Emphasis* Emphasis
**Strong** Strong
Blockquotes md & rST Combined
•>•Lorem ipsum¶
•dolor sit amet
> Lorem ipsum
dolor sit amet
Inline Code md & rST ``echo `uname -a``` echo `uname -a`
Code Blocks md & rST Combined
Normal text ::¶
⇥ #include <stdio.h>
Normal text ::
#include <stdio.h>
Horizontal Rules rST
----

----

____

____

Escapable Characters md & rST
\ \ Backslash
\ Backslash
\ ` Backtick
` Backtick
\ * Asterisk
* Asterisk
\ _ Underscore
_ Underscore
\ { \ } Curly braces
{ } Curly braces
\ [ \ ] Square brackets
[ ] Square brackets
\ ( \ ) Parantheses
( ) Parantheses
\ # Hash mark
# Hash mark
\ + Plus sign
+ Plus sign
\ - Hyphen
- Hyphen
\ . Period
. Period
\ ! Exclamation
! Exclamation
Links HTML
<a href=“https://google.com/">
Google</a>
 
title=“Search”>Google</a>
 
title=“Search”>Google</a>
 
<a href=“https://google.com/">
 
Images HTML
<img scr=“path/to/img.jpg”
alt=“Alt text”/>
 
<img scr=“path/to/img.jpg”
alt=“Alt text” title=“Title”/>
 
<img scr=“path/to/img.jpg”
alt=“Alt text” title=“Title”/>
 
Tables rST
+-------+----------+------+
| Table Headings | Here |
+-------+----------+------+
| Sub | Headings | Too |
+=======+==========+======+
| cell | column spanning |
+-------+----------+------+
| rows | normal | cell |
+-------+----------+------+
| multi | * cells can be |
| line | * formatted |
| cells | * paragraphs |
| too | |
+-------+-----------------+
Table Headings Here
Sub Headings Too
cell column spanning
rows normal cell
multi line cells too
  • cells can be
  • formatted
  • paragraphs

More Exhaustive Resources

> reStructuredText

> Markdown

> HTML & Web Development

Clone this wiki locally