Thêm HTML code to blog

Để thêm code block vào blog làm theo các bước sau

  • Copy code muốn thêm vào và truy cập trang web http://www.blogcrowds.com/resources/parse_html.php để chuyển code sang dạng ký tự đặc biệt

  • Paste code vào ô "Your code has been parsed, copy & paste into your template code." và click Parse button

  • Copy code đã được tạo ra và thay thế vào html_code ở phía dưới và sau đó thêm vào vị trí mong muốn và save lại

<pre>
    <code class="html">html_code</code>
</pre>

Done

Ví Dụ

Ví dụ muốn hiển thị code

<link rel="icon" type= "image/x-icon" href="<?php echo get_stylesheet_directory_uri(); ?>/favicon.ico">

Copy code đấy và truy cập trang phía trên và Parse code ta sẽ được

&lt;link rel=&quot;icon&quot; type= &quot;image/x-icon&quot; href=&quot;&lt;?php echo get_stylesheet_directory_uri(); ?&gt;/favicon.ico&quot;&gt;

Thay thế vào html_code

<pre>
    <code class="html">
    &lt;link rel=&quot;icon&quot; type= &quot;image/x-icon&quot; href=&quot;&lt;?php echo get_stylesheet_directory_uri(); ?&gt;/favicon.ico&quot;&gt;
    </code>
</pre>

Thêm code này vào vị trí mong muốn và sẽ được

Last updated

Was this helpful?