Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私は Visual Basic コードを持っていて、自分の Web サイトにオンラインで掲載したいのですが、WYSIWYG エディターでそれを貼り付けると、ID が消えてしまいます... コード ID を HTML に変換する正しい方法は何ですか?
手っ取り早い方法は、<pre>タグを使用することです。white-space: preコード ブロックを含む要素に適用することもできます。これにより、空白 (改行、タブ、スペースなど) が保持されます。
<pre>
white-space: pre
http://css-tricks.com/almanac/properties/w/whitespace/
Web 表示には構文強調表示ライブラリを使用する必要があります。たくさんありますが、ほんの一例です:
http://alexgorbatchev.com/SyntaxHighlighter/