JAVA_EE/HTML
[21.09.09] exam15 - <pre>/<code>/</> 활용하여 코드 작성하는 방법
luvforjunk
2021. 9. 9. 18:34
728x90
반응형
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<pre>
<code>
<script src="js/jquery.js"></script>
<script>
$(".selector").click(function(){
$(".box").hide();
});
</script>
</code>
</pre>
</body>
</html>
<!--
* <pre>
- img, big, small, sub, sup, ins, del, label, input, select, textarea, button, noscript 태그 등의
텍스트를 장식하기 위한 요소로 사용하면 안된다.
- 폼과 스크립트 관련 요소도 포함할 수 없다.
- 일반적으로 코드의 예제를 보여주기 위한 방안으로 활용된다.
- 내용을 있는 그대로 보여줄 때 사용한다.
* <code>
- 코드임을 알리는 용도이다.
* < : <
> : >
-->
728x90
반응형