웹 페이지에 컴퓨터 코드를 표시하기 위해 일부 요소가 HTML로 제공됩니다. 그 요소들을 하나씩 살펴보자 -
<!DOCTYPE html> <html> <body> <h2>Shortcut Keys</h2> <p>Use the following shortcut keys −</p> <p><strong>Cut</strong> − <kbd>CTRL</kbd>+<KBD>X</kbd></p> <p><strong>Copy</strong> − <kbd>CTRL</kbd>+<KBD>C</kbd></p> <p><strong>Paste</strong> − <kbd>CTRL</kbd>+<KBD>V</kbd></p> <p><strong>Undo</strong> − <kbd>CTRL</kbd>+<KBD>Z</kbd></p> </body> </html>
출력
<!DOCTYPE html> <html> <body> <h2>Demo Heading</h2> <pre> This is a demo text and will appear in the same format as it is visible here. The pre tag displays the text in a fixed-width font. It preserves both spaces and line breaks as you can see here. </pre> </body> </html>