Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

markdown - how do I display HTML?

Tags:

markdown

I am trying to add a wiki page on GitHub that contains sample HTML but can't figure out how to display the actual HTML, not try to render it.

I tried & lt; & gt; and < < but then it renders it like

& lt;table& gt;

like image 260
Kenoyer130 Avatar asked Apr 21 '12 19:04

Kenoyer130


People also ask

Can Markdown display HTML?

in HTML will appear as <div class=Heading 1> Markdown also allows for raw HTML. There is no need to put any syntax around the code, but it needs to stand alone in the source document with no content above or below. A good example of using raw HTML in a Markdown document is when embedding a Youtube video.

How do I view HTML file in MD?

The first step to convert Markdown to HTML is to open your Markdown document in Atom. Then toggle the Markdown preview by pressing the CTRL+SHIFT+M keyboard shortcut. Another way to toggle the Markdown preview is from Packages —> Markdown Preview —> Toggle Preview.

How do I display code in Markdown?

There are two ways to format code in Markdown. You can either use inline code, by putting backticks (`) around parts of a line, or you can use a code block, which some renderers will apply syntax highlighting to.

Can I put HTML in Md file?

You can add html inside markdown files in /content. However your indented code will follow markdown formatting. You could also save your content files as . html but then you'll have to write everything in html.


1 Answers

If you want display HTML as code sample. You can use formatting for code

Examples:

```html
<!DOCTYPE html>
<html>
  <head>
    <title>This is a title</title>
  </head>
  <body>
    <p>Hello world!</p>
  </body>
</html>
```

```xml
<?xml version="1.0" encoding="ISO-8859-1" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
</xs:schema>
```
like image 178
ck3g Avatar answered Oct 07 '22 15:10

ck3g