웹 페이지에 컴퓨터 코드를 표시하기 위해 일부 요소가 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>
출력
요소
태그는 HTML 문서의 코드 형식을 지정하는 데 사용됩니다. 예를 들어 Java 코드를 작성하고 형식을 올바르게 지정하려면 HTML에서
요소를 사용하십시오. 이제 HTML에서
요소를 구현하는 예를 살펴보겠습니다 -
예시
<!DOCTYPE html> <html> <body> <h1>Header Files</h1> <h2>C++</h2> <code> #include <iostream> </code> <h2>C</h2> <code> #include <stdio> </code> </body> </html>
출력
HTML의 요소
HTML의 요소는 계산을 위한 수학적 표현을 표시하는 데 사용됩니다.
이제 HTML에서 태그를 구현하는 예를 살펴보겠습니다 -
예시
<!DOCTYPE html> <html> <body> <h2>Mathematical Equation</h2> Sample equation − <var>2x</var> - <var>2z</var> = <var>3y</var> + 9 </body> </html>
출력
HTML의 요소
HTML의 태그는 ,
, 등과 같은 구문 태그이며 HTML 문서의 텍스트 형식을 지정하는 데 사용됩니다.
이제 요소 −
를 구현하는 예를 살펴보겠습니다.예시
<!DOCTYPE html> <html> <body> <h2>Exam Results</h2> <p><s>Result would be announced on 6th June.</s></p> <samp>New date for results are 7th June.</samp> </body> </html>
출력