<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>My page</title>
</head>
<body>
<p>My page</p>
<a href="https://www.google.co.kr/">Google</a>
<img src="images/sample.png" alt="sample imge">
</body>
</html>
Paragraph element
<p>Hi I am a watermelon</p>
문단이 들어가는 부분
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/p
<p>: The Paragraph element - HTML: HyperText Markup Language | MDN
The <p> HTML element represents a paragraph. Paragraphs are usually represented in visual media as blocks of text separated from adjacent blocks by blank lines and/or first-line indentation, but HTML paragraphs can be any structural grouping of related con
developer.mozilla.org
Anchor (하이퍼텍스트)
<a href="https://www.naver.com">Bear</a>
Bear을 클릭하면 url 페이지로 이동하겠다.
image tag
<img src="./images/bear.jpg" alt="It doesn't work">
이미지 태그는 닫는 태그가 없다.
중간에 내용이 없다는 뜻
(여는 태그와 닫는 태그가 있다는 것은, 중간에 내용이 있다는 뜻이다)
src는 source의 약자이다.
우리가 가져오는 이미지의 소스 자체가 contents이기 때문에
따로 contents가 필요하지 않다.
alt는 대체 텍스트이다.
이미지의 경로가 잘못 되었거나, 이미지 파일이 누락되었을 때
'WEB > HTML' 카테고리의 다른 글
[HTML] h1 ~h6, ol,li,ul, em, strong (0) | 2024.03.10 |
---|---|
[HTML] HTML 코드 한방에 셋팅 / ! + enter (0) | 2024.03.10 |
[HTML] HTML 주석 단축키 Ctrl + / (0) | 2024.03.10 |
[HTML] HTML의 문법 구조 / Element(요소), 속성(Attribute) (0) | 2024.03.10 |
[HTML] HTML이란? (0) | 2024.03.10 |