Code in Markdown vs Code in HTML (STEEMIT)

in #markdown6 years ago

HTML vs Markdown

33744616_2076889862594494_5752343445783969792_n.jpg

Before We proceed to the code I just want to explain a little bit about the HTML and Markdown in Steemit. Because I know some of you confuse about the difference between the two.

So, HTML (Hypertext Markup Language) is the set of markup symbols or codes inserted in a file intended for display on a World Wide Web browser page.

All HTML is valid Markdown. If you’re stuck, not able to format your content as you would like (for example using tables), you can always use plain HTML instead of Markdown.

While Markdown is a text-to-HTML conversion tool for web writers. Markdown allows you to write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid XHTML (or HTML).

Markdown is not a replacement for HTML, or even close to it…The idea for Markdown is to make it easy to read, write, and edit prose. - John Gruber

HTML tags add lots of in-line noise. They make a document hard to read. For people unfamiliar with HTML, it could be impossible. Reading a Markdown document should make plain sense to anyone.

Here’s an example of the difference:

1. Headers :

  • Markdown

    Code :
          # h1

          ## h2

          ### h3

    Output :

        h1

         h2

          h3

  • HTML

    Code :
          <h1> h1 </h1>

          <h2> h2 </h2>

          <h3> h3 </h3>

    Output :

        h1


         h2


          h3

2. Italics :

  • Markdown

    Code :

                  *italic*

    Output :

          italic

  • HTML

    Code :
          <i> italic </i>

    Output :
          italic

3. Bold :

  • Markdown

    Code :

                  __bold__

    Output :

           bold

  • HTML

    Code :
          <b> bold </b>

    Output :
          bold

3. Lists :

  • Markdown

    Code :
          * unordered
          * unordered

          1. ordered
          2. ordered

    Output :

    • unordered
    • unordered
    1. ordered
    2. ordered

  • HTML

    Code :
          <ul>      
           <li class="new">unordered</li>
           <li class="new">unordered</li>
          </ul>

          <ol>      
           <li class="new">ordered</li>
           <li class="new">ordered</li>
          </ol>

    Output :

    • unordered
    • unordered
    1. ordered
    2. ordered

4. Images :

  • Markdown

    Code :

    
        Direct Image link :
    https://cdn.steemitimages.com/DQmeaC9H7qcgKC7CVfRPG26VBe5Baoasth8DHWbHwByEFmU/33744616_2076889862594494_5752343445783969792_n.jpg
       

    Output :

  • HTML

    Code :

    Output :

4. Links :

  • Markdown

    Code :

    
        [Image Source](https://cdn.steemitimages.com/DQmeaC9H7qcgKC7CVfRPG26VBe5Baoasth8DHWbHwByEFmU/33744616_2076889862594494_5752343445783969792_n.jpg)
       

    Output :
          Image Source

😃Thank you for reading!😃

Please... follow me and resteem this post to help more newbies here in Steemit

If you have comments, opinions, reactions or corrections, please drop it off. I will surely appreciate it.



Username.png

Sort:  

Nice info.

The reason social media sites use markdown is because HTML tags can contain javascript. When a site allows HTML, they are inundated with hackers trying to inject programs into the tags.

sneaky-ninja-sword-xs.jpg
Sneaky Ninja Attack! You have just been defended with a 2.28% upvote!
I was summoned by @r5yn1r4. I have done their bidding and now I will vanish...

woosh
A portion of the proceeds from your bid was used in support of youarehope and tarc.

Abuse Policy
Rules
How to use Sneaky Ninja
How it works
Victim of grumpycat?

nice post, I need help how can we embed steemit post in a website .

That's great! However, most of my HTML markup doesn't work. I wonder why...

Thanks for putting this together! I'm a newbie and had to bookmark some github pages for markdown. Your summary is much easier to read. Thanks!!

This post has received a 0.79 % upvote from @booster thanks to: @r5yn1r4.

Coin Marketplace

STEEM 0.17
TRX 0.12
JST 0.027
BTC 62585.78
ETH 3013.43
USDT 1.00
SBD 2.49