티스토리 뷰

HTML

HTML Basic Examples

아이언 베어 2020. 12. 10. 23:23

HTML Basic Examples

 

HTML Documents

All HTML documents must start with a document type declaration: <!DOCTYPE html>.

The HTML document itself begins with <html> and ends with </html>.

The visible part of the HTML document is between <body> and </body>.

 

모든 HTML 문서는 <!DOCTYPE html>를 통해 HTML문서임을 선언해야한다.

HTML문서는 <html>를 이용해 시작하고 </html>를 이용해 끝내야한다.

HTML의 보여지는 부분은 <body></body>사이에 작성한다.

 

 

The <!DOCTYPE> Declaration

The <!DOCTYPE> declaration represents the document type, and helps browsers to display web pages correctly.

It must only appear once, at the top of the page (before any HTML tags).

The <!DOCTYPE> declaration is not case sensitive.

The <!DOCTYPE> declaration for HTML5 is:

 

<!DOCTYPE>는 문서타입을 나타내어 브라우저가 웹페이지를 올바르게 표시 할 수 있게 한다.

페이지 맨 위에 한번만 작성한다.

대소문자를 구별하지 않는다.

 

 

HTML Headings

HTML headings are defined with the <h1> to <h6> tags.

<h1> defines the most important heading. <h6> defines the least important heading: 

 

<h1>부터 <h6>까지 있으며 뒤의 숫자가 커질수록 글자크기는 점점 작아진다.

 

 

HTML Paragraphs

HTML paragraphs are defined with the <p> tag:

 

 

HTML Links

HTML links are defined with the <a> tag:

 

 

HTML Images

HTML images are defined with the <img> tag.

The source file (src), alternative text (alt), width, and height are provided as attributes:

 

 

How to View HTML Source?

Have you ever seen a Web page and wondered "Hey! How did they do that?"

View HTML Source Code:

Right-click in an HTML page and select "View Page Source" (in Chrome) or "View Source" (in Edge), or similar in other browsers. This will open a window containing the HTML source code of the page.

Inspect an HTML Element:

Right-click on an element (or a blank area), and choose "Inspect" or "Inspect Element" to see what elements are made up of (you will see both the HTML and the CSS). You can also edit the HTML or CSS on-the-fly in the Elements or Styles panel that opens.

'HTML' 카테고리의 다른 글

HTML Block and Inline Elements  (0) 2020.12.12
HTML Elements  (0) 2020.12.11
HTML Introduction/HTML 소개  (0) 2020.12.10