"자바스크립트가 지원되지 않는곳에서는 이것을 사용해주세요" 에 의미를 사용할때 쓴다.
즉, 스크립트를 지원하지 않는 경우에 삽입할 HTML을 정의하는 것이다.
간단하게 sandbox를 이용해서 자바스크립트가 실행하지 못하는 환경을 임의로 만들었다.
<!--index.html 파일-->
<head>
<meta charset="UTF-8">
<title>콘텐츠 구분 예제</title>
<script src="https://kit.fontawesome.com/a076d05399.js"></script>
<link rel="stylesheet" href="./main.css">
<script type = "text/javascript" src = "./js/main.js" defer></script>
</head>
<body>
HELLO!
<noscript>
자바스크립트를 지원하지 않는 환경이다.
</noscript>
</body>
<!--noscript.html 파일-->
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>No script</title>
</head>
<body>
<iframe src="./index.html" frameborder="0" style = "border : 4px solid red;" sandbox></iframe>
</body>
</html>
'HTML > 요소' 카테고리의 다른 글
표 콘텐츠 - TH (0) | 2021.01.05 |
---|---|
표 콘텐츠 - TABLE (0) | 2021.01.04 |
스크립트 - SCRIPT 2 (0) | 2021.01.04 |
스크립트 - SCRIPT 1 (0) | 2021.01.04 |
내장 콘텐츠 - CANVAS (0) | 2021.01.04 |