Sunday, January 24, 2021

ブラウザ上にソースコードをそのまま表示

サンプルコードをHTMLに書きたいときは、<pre>〜</pre>、<code>〜</code>を使う

#サンプルコード:

import numpy as np
# test
a = np.arange(10)
print(a)

<参考>

http://www.hp-stylelink.com/news/2013/08/20130821.php

https://code-kitchen.dev/html/pre/

No comments:

Post a Comment