Styling with Markdown
This is how you would style with markdown.
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Lorem ipsum dolor sit amet, test link adipiscing elit. This is strong. Nullam dignissim convallis est. Quisque aliquam. This is emphasized. Donec faucibus. Nunc iaculis suscipit dui. 53 = 125. Water is H2O. Nam sit amet sem. Aliquam libero nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl. The New York Times (That’s a citation). Underline. Maecenas ornare tortor. Donec sed tellus eget sapien fringilla nonummy. Mauris a ante. Suspendisse quam sem, consequat at, commodo vitae, feugiat in, nunc. Morbi imperdiet augue quis tellus.
HTML and CSS are our tools. Mauris a ante. Suspendisse quam sem, consequat at, commodo vitae, feugiat in, nunc. Morbi imperdiet augue quis tellus. Praesent mattis, massa quis luctus fermentum, turpis mi volutpat justo, eu volutpat enim diam eget metus. To copy a file type COPY filename
. Dinner’s at 5:00. Let’s make that 7. This text has been struck.
Media
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore.
Big Image
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Small Image
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore.
Labore et dolore.
List Types
Definition List
Definition List Title : This is a definition list division.
Definition : An exact statement or description of the nature, scope, or meaning of something: our definition of what constitutes poetry.
Ordered List
- List Item 1
-
List Item 2
- Nested list item A
- Nested list item B
- List Item 3
Unordered List
- List Item 1
-
List Item 2
- Nested list item A
- Nested list item B
- List Item 3
Table
Table Header 1 | Table Header 2 | Table Header 3 |
---|---|---|
Division 1 | Division 2 | Division 3 |
Division 1 | Division 2 | Division 3 |
Division 1 | Division 2 | Division 3 |
Preformatted Text
Typographically, preformatted text is not the same thing as code. Sometimes, a faithful execution of the text requires preformatted text that may not have anything to do with code. Most browsers use Courier and that’s a good default — with one slight adjustment, Courier 10 Pitch over regular Courier for Linux users.
Code
Code can be presented inline, like <?php bloginfo('stylesheet_url'); ?>
, or using jekyll’s highlight
filter to
highlight a block of code. Because we have more specific typographic needs for code, we’ll specify Consolas and Monaco ahead of the browser-defined monospace font.
#container {
float: left;
margin: 0 -240px 0 0;
width: 100%;
}
Blockquotes
Let’s keep it simple. Italics are good to help set it off from the body text. Be sure to style the citation.
Good afternoon, gentlemen. I am a HAL 9000 computer. I became operational at the H.A.L. plant in Urbana, Illinois on the 12th of January 1992. My instructor was Mr. Langley, and he taught me to sing a song. If you’d like to hear it I can sing it for you. — HAL 9000
And here’s a bit of trailing text.
Text-level semantics
HTML elements
The a element example
The abbr element and abbr element with title examples
The b element example
The cite element example
The code element
example
The del element example
The dfn element and dfn element with title examples
The em element example
The i element example
The ins element example
The kbd element example
The mark element example
The q element
example inside
a q element
The s element example
The samp element example
The small element example
The span element example
The strong element example
The sub element example
The sup element example
The var element example
The u element example
Embeds
Sometimes all you want to do is embed a little love from another location and set your post alive.
Video
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Culpa qui officia deserunt mollit anim id est laborum.
Slides
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Culpa qui officia deserunt mollit anim id est laborum.
Audio
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Culpa qui officia deserunt mollit anim id est laborum.
Code
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt.
See the Pen Simple Rotating Spinner by Rob Glazebrook (@rglazebrook) on CodePen.
Isn’t it beautiful.
At the bottom of the editor, you’ll find a toolbar with basic formatting options to help you get started as easily as possible. You’ll also notice that there’s a ? icon, which contains more advanced shortcuts.
For now, though, let’s run you through some of the basics. You’ll want to make sure you’re editing this post in order to see all the Markdown we’ve used.
Formatting text
The most common shortcuts are of course, bold text, italic text, and hyperlinks. These generally make up the bulk of any document. You can type the characters out, but you can also use keyboard shortcuts.
CMD/Ctrl + B
for BoldCMD/Ctrl + I
for ItalicCMD/Ctrl + K
for a LinkCMD/Ctrl + H
for a Heading (Press multiple times for h2/h3/h4/etc)
With just a couple of extra characters here and there, you’re well on your way to creating a beautifully formatted story.
Inserting images
Images in Markdown look just the same as links, except they’re prefixed with an exclamation mark, like this:
![Image description](/path/to/image.jpg)
Making lists
Lists in HTML are a formatting nightmare, but in Markdown they become an absolute breeze with just a couple of characters and a bit of smart automation. For numbered lists, just write out the numbers. For bullet lists, just use *
or -
or +
. Like this:
- Crack the eggs over a bowl
- Whisk them together
- Make an omelette
or
- Remember to buy milk
- Feed the cat
- Come up with idea for next story
Adding quotes
When you want to pull out a particularly good excerpt in the middle of a piece, you can use >
at the beginning of a paragraph to turn it into a Blockquote. You might’ve seen this formatting before in email clients.
A well placed quote guides a reader through a story, helping them to understand the most important points being made
All themes handles blockquotes slightly differently. Sometimes they’ll look better kept shorter, while other times you can quote fairly hefty amounts of text and get away with it. Generally, the safest option is to use blockquotes sparingly.
Dividing things up
If you’re writing a piece in parts and you just feel like you need to divide a couple of sections distinctly from each other, a horizontal rule might be just what you need. Dropping ---
on a new line will create a sleek divider, anywhere you want it.