Markup Language Cheat Sheet
This look-up system only works with Javascript activated. You can do a manual look up in the complete list of keywords (TBD).
- Wiki Markup Language Cheat Sheet
- Md Cheat Sheet
- Mediawiki Markup Language Cheat Sheet
- Markup Language Cheat Sheet
- R Markdown Cheat Sheet
Wiki markup quick reference (PDF download) For a full list of editing commands, see Help:Wikitext For including parser functions, variables and behavior switches, see Help:Magic words.
Lookup in HTML, JavaScript, CSS, SVG, XPath:
HTML: Hypertext Markup Language, a standardized system for tagging text files. CSS: Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation of a document written in a markup language. Markup cheat sheet (you are here) If you think something is missing or should be added to this list, let us know in the contributor forum. This is a list of the most commonly used wiki markup in support articles. For more complete documentation see. Language Language.
Accessibility: WCAG2 at a Glance
Perceivable
- Provide text alternatives for non-text content.
- Provide captions and alternatives for audio and video content.
- Make content adaptable; and make it available to assistive technologies.
- Use sufficient contrast to make things easy to see and hear.
Operable
- Make all functionality keyboard accessible.
- Give users enough time to read and use content.
- Do not use content that causes seizures.
- Help users navigate and find content.
Understandable
- Make text readable and understandable.
- Make content appear and operate in predictable ways.
- Help users avoid and correct mistakes.
Robust
- Maximize compatibility with current and future technologies.
See WCAG Overview.
Internationalization Quicktips
Use Unicode wherever possible for content, databases, etc. Always declare the encoding of content.
The character encoding you choose determines how bytes are mapped to characters in your text.
Normally character encodings limit you to a particular script or set of languages. Unicode allows you to deal simply with almost all scripts and languages in use around the world. In this way Unicode simplifies the handling of content in multiple languages, whether within a single page or across one or more sites. Unicode is particularly useful when used in forms, scripts and databases, where you often need to support multiple languages. Unicode also makes it very straightforward to add new languages to your content.
Unless you appropriately declare which character encoding you are using your users may be unable to read your content. This is because incorrect assumptions may be made by the application interpreting your text about how the bytes map to characters.
- Give me more background
- Character encodings for beginners explains some of the basic concepts about character encodings, and why you should care. Introducing Character sets and Encodings gives an gentle introduction to various aspects of the topic.
- So, how do I do this?
- HTML & CSS authors • Spec developers• Server setup
Use characters rather than escapes (e.g. á á or á) whenever you can.
Escapes such as Numeric Character References (NCRs), and entities are ways of representing any Unicode character in markup using only ASCII characters. For example, you can represent the character á in X/HTML as á or á or á.
Such escapes are useful for clearly representing ambiguous or invisible characters, and to prevent problems with syntax characters such as ampersands and angle brackets. They may also be useful on occasion to represent characters not supported by your character encoding or unavailable from your keyboard. Otherwise you should always use characters rather than escapes.
- Give me more background
- Using character entities and NCRs provides additional information about the use of escapes in markup languages. In particular, note that entities (such as á) should be used with caution.
- So, how do I do this?
- HTML & CSS authors • Spec developers • SVG authors
Declare the language of documents and indicate internal language changes.
Information about the (human) language of content is already important for accessibility, styling, searching, editing, and other reasons. As more and more content is tagged and tagged correctly, applications that can detect language information will become more and more useful and pervasive.
When declaring language, you may need to express information about a specific range of content in a different way from metadata about the document as a whole. It is important to understand this distinction.
- Give me more background
- Language on the Web gives an gentle introduction to various aspects of the topic.
- So, how do I do this?
- HTML & CSS authors • SVG authors • XML authors • Schema developers • Server setup
Use style sheets for presentational information. Restrict markup to semantics.
It is an important principle of Web design to keep the way content is styled or presented separate from the actual text itself. This makes it simple to apply alternative styling for the same text, for example in order to display the same content on both a conventional browser and a small hand-held device.
This principle is particularly useful for localization, since different scripts have different typographic needs. For example, due to the complexity of Japanese characters, it may be preferable to show emphasis in Japanese X/HTML pages in other ways than bolding or italicisation. It is much easier to apply such changes if the presentation is described using CSS, and markup is much cleaner and more manageable if text is correctly and unambiguously labelled as 'emphasised' rather than just 'bold'.
It can save considerable time and effort during localization to work with CSS files rather than have to change the markup, because any needed changes can be made in a single location for all pages, and the translator can focus on the content rather than the presentation.
- Give me more background
- Read the talks slides from the 2007 @media conference presentation 'Designing for International Users: Practical Tips'.
Check for translatability and inappropriate cultural bias in images, animations & examples.
If you want your content to really communicate with people, you need to speak their language, not only through the text, but also through local imagery, color, objects and preoccupations. It is easy to overlook the culture-specific nature of symbolism, behaviour, concepts, body language, humor, etc. You should get feedback on the suitability and relevance of your images, video-clips, and examples from in-country users.
You should also take care when incorporating text in graphics when content is translated. Text on complex backgrounds or in restricted spaces can cause considerable trouble for the translator. You should provide graphics to the localization group that have text on a separate layer, and you should bear in mind that text in languages such as English and Chinese will almost certainly expand in translation.
- Give me more background
- Read the talks slides from the 2007 @media conference presentation 'Designing for International Users: Practical Tips'.
Use an appropriate encoding on both form and server. Support local formats of names/addresses, times/dates, etc.
The encoding used for an HTML page that contains a form should support all the characters needed to enter data into that form. This is particularly important if users are likely to enter information in multiple languages.
Databases and scripts that receive data from forms on pages in multiple languages must also be able to support the characters for all those languages simultaneously.
The simplest way to enable this is to use Unicode for both pages containing forms and all back-end processing and storage. In such a scenario the user can fill in data in whatever language and script they need to.
You should also try to avoid making assumptions that things such as the user's name and address will follow the same formatting rules as your own. Ask yourself how much detail you really need to break out into separate fields for things such as addresses. Bear in mind that in some cultures there are no street names, in others the house number follows the street name, some people need more than one line for the part of the address that precedes the town or city name, etc. In fact in some places an address runs top down from the general to the specific, which implies a very different layout strategy. Be very careful about building into validation routines incorrect assumptions about area codes or telephone number lengths. Recognize that careful labelling is required for how to enter numeric dates, since there are different conventions for ordering of day, month and year.
If you are gathering information from people in more than one country, it is important to develop a strategy for addressing the different formats people will expect to be able to use. Not only is this important for the design of the forms you create, but it also has an impact on how you will store such information in databases.
- So, how do I do this?
- HTML & CSS authors • HTML & CSS authors • Spec developers
Use simple, concise text. Use care when composing sentences from multiple strings.
Simple, concise text is easier to translate. It is also easier for people to read if the text they are reading is not in their first language.
You should take considerable care when composing messages from multiple substrings, or when inserting variable text into strings. For example, suppose your site uses JSP scripting, and you decide to compose certain messages on the fly. You may create messages by concatenating separate substrings, such as 'Only' or 'Don't', ' return results in ', and 'any format' or 'HTML'. Because the order of text in sentences of other languages can be very different, translating this may present major difficulties.
Similarly, it is important to avoid fixing the positions of variables in text such as 'Page 1 of 10'. The syntax of other languages may require the numbers to be reversed to make sense. If you use PHP, this would mean using a formatting string such as 'Page %1$d of %2$d.', rather than the more simple 'Page %d of %d.'. The latter is untranslatable in some languages.
- So, how do I do this?
- HTML & CSS authors
On each page include clearly visible navigation to localized pages or sites, using the target language.
Where you have versions of a page or site in a different language, or for a different country or region, you should provide a way for the user to view the version they prefer. This should be available from any page on your site where an alternative exists.
When providing links to pages in other languages, use the name of the target language in the native language and script. Don't assume that the user can read English. For example, in a link to a French page, 'French' would be written 'français'. This also applies if you are guiding the user to a country- or region-specific page or site, eg. 'Germany' would be 'Deutschland'.
- So, how do I do this?
- HTML & CSS authors
For XHTML, add dir='rtl'
to the html
tag for right-to-left text. Only re-use it to change the base direction.
Text in languages such as Arabic, Hebrew, Persian and Urdu is read from right to left. This reading order typically leads to right-aligned text and mirror-imaging of things like page and table layout. You can set the default alignment and ordering of page content to right to left by simply including in the html tag.
The direction set in the html tag sets a base direction for the document which cascades down through all the elements on the page. It is not necessary to repeat the attribute on lower level elements unless you want to explicitly change the directional flow.
Embedded text in, for example, Latin script still runs left to right within the overall right to left flow. So do numbers. If you are working with right to left languages, you should become familiar with the basics of the Unicode bidirectional algorithm. This algorithm takes care of much of this bidirectional text without the need for intervention from the author. There are some circumstances, however, where markup or Unicode control characters are needed to ensure the correct effect.
- Give me more background
- Creating (X)HTML Pages in Arabic & Hebrew provides a gentle introduction to the basics of handling right-to-left text in HTML. The principles are similar for other markup languages.
- What you need to know about the bidi algorithm and inline markup provides a gentle introduction to the basics of handling inline bidirectional text.
- So, how do I do this?
- HTML & CSS authors • SVG authors • XML authors • Schema developers
Validate! Use techniques, tutorials, and articles at http://www.w3.org/International/
English Typography
Use the proper English characters instead of their misused equivalents.
- Quotes
- “ (
“
) opening quote (instead of ') - ” (
”
) closing quote (instead of ') - Apostrophe
- ’ (
’
) apostrophe (instead of ') - Dashes and Hyphens
- – (
–
or–
) en dash, used for ranges, e.g. “13–15 November” (instead of -) - — (
—
or—
) em dash, used for change of thought, e.g. “Star Wars is—as everyone knows—amazing.” (instead of -, or --) - Ellipsis
- … (
…
or…
) horizontal ellipsis, used to indicate an omission or a pause (instead of ...)
Wiki Markup Language Cheat Sheet
Markdown is a lightweight markup language, like Creole, JsonML, or Texy!. The lightweight markup languages have a simple, intuitive syntax making them useful for various text editors and wikis.
Markdown was created by John Gruber and Aaron Swartz in 2004. It is widely used for annotating readme files and curating rich-text messages. Markdown is very useful for creating rich-text formatting using a normal, plain text editor.
In this post, we are going to take a look at some of the most useful and frequently used features of this language. This Markdown cheat sheet is going to come in handy for anybody dabbling in it.
One thing to note here is that some of the features listed here are not fully supported by Markdown and needs additional support from the editor. But any new editor should do a good job.
Here’s the list of what we cover in this article:
1. Heading
You can create a heading by using an adequate number of hashes (‘#’). You can control the size of the heading by reducing or increasing the number of hashes.
### Big Header
## Bigger Header
# Biggest Header
2. Bold
The bold effect can be achieved using either the double star (‘**’) or the double underscore (‘__’). You need to wrap the text in any one of the mentioned symbols.
Md Cheat Sheet
**Bold text created using the double star.**
__Bold text created using the double underscore.__
3. Italics
Italicized text can be created by using either the single star (‘*’) or the single underscore (‘_’). Just like the bold, you need to wrap the text in any one of these characters.
*Italicised text created using the single star.*
_Italicised text created using the single underscore._
Note: You can create the bold and italics effects together also (in case you want a ‘bold italicized’ piece of text). Be sure to close them properly as it can get pretty messy.
4. Blockquote
Quotes are very useful for writing messages or emails. To create a quoted text, you use the forward angle bracket (‘>’). There is a useful feature that some editors support. In case you have a very long passage to quote, you can conveniently place each sentence in a new line starting with a forward angle bracket.
You could shove everything in a single looooooooong line as well, but that’s simply less useful. This makes the source file much cleaner and readable.
> This is the first line.
> This is the second line. They are going to be part of the same quote. Cool!
> This is a very, very, very long line. This is going to look the same as before, but it’s much better to break this line into multiple parts if possible.
5. Strikethrough
Just like bold or italics, you need to wrap the text in the double tilde (‘~~’).
~~To create the strikethrough effect, use a double tilde.~~
6. Horizontal Rule
There are some ambiguities as to how a horizontal rule could be created. The original Markdown required the use of a triple hyphen (—) for creating a horizontal rule. But many editors these days support some other syntaxes as well such as the triple asterisk (***) and triple underscore (___).
This text is before the horizontal rule.
***
This text is after the horizontal rule.
7. Code
Often you would need to include a piece of code in your text. Markdown lets you include code very easily. In fact, you can include the code using two different methods.
The first way is to simply wrap the code inside single backticks (‘`’). This is the preferred way if you want an inline code i.e. any text in the same line before and after the code would be rendered in the same line.
This text is before the code. `This is a piece of code surrounded by backticks.` This text is after the code.
The second method is to use what is popularly known as ‘fenced code blocks’. A piece of code surrounded by triple backticks (‘“`’) would be rendered separately from the text preceding and following it.
“`
This is a piece of code surrounded by triple backticks.
“`
Note: While rendering codes is an inherent feature of Markdown, code highlighting is not. That being said, many modern editor support code highlighting anyway. You need to mention the language that you are using immediately after the opening triple backticks.
8. List
Lists are useful for creating numbered collections. There is, in fact, no special syntax for creating one. You simply write to them as you would have normally written, and the Markdown editor would take care of the rest.
- The first line.
- The second line.
- The third line.
9. Unordered List
Unordered lists are different from the ordered lists in that they don’t include the number, instead use a bullet symbol. The items can be specified using a hyphen (‘-‘), plus (‘+’), or asterisk (‘*’).
– The first item.
+ The second item.
* The third item.
10. Table
Markdown inherently does not support tables, although most of the modern Markdown editors support them. The columns are denoted by pipes (‘|’) while hyphens (‘-‘) are used to separate the heading and the rest of the rows.
| Product | Quantity | Price |
| ——– | ——— | —– |
| Milk | 1 liter | $1 |
| Butter | 0.5 kg | $3 |
| Tuna | 1 kg | $30 |
11. Links
There are many different ways to include an anchor or hyperlink in the document. You need to use the square brackets (‘[]’) for specifying the text while parentheses (‘()’) is used to specify the webpage (plus the optional description).
[This is a link without description.](https://www.google.com)
[This is a link with description.](https://www.google.com “Google knows everything!”)
12. Images
Including an image in your document is somewhat similar to including a link. Here you need to specify an alternate text inside the square brackets (‘[]’) while the link to the image is specified inside the parentheses (‘()’). Just like links, you can also specify an optional description.
![alt text](https://s16458.pcdn.co/wp-content/uploads/2020/01/logo-1.png “ByteScout!!”)
13. YouTube Videos
Including videos is not very straightforward, and it is mostly up to the editors (rather than Markdown). Following is a way to attach a video, although it cannot be played directly (it simply redirects the user to where the video is located).
Mediawiki Markup Language Cheat Sheet
[![IMAGE ALT TEXT HERE](https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png)](https://youtu.be/6A5EpqqDOdk)
About the Author