[MOFE] HTML – 2. HTML Basic

[MOFE] HTML – 2. HTML Basic

Contents

  1. HTML Document Structure
    1. Basic template
    2. DOCTYPE
    3. html
    4. head
    5. body
  2. HTML Syntax
    1. Elements
      1. Basic elemetns
      2. Nested elements
      3. Empty elements
    2. Attributes
      1. Basic attributes
      2. Global attributes
    3. Comments

1. HTML Document Structure

1. Basic form

<DOCTYPE html> 
<html>
    <head>
        <title>Hello HTML</title>
        <meta charset="utf-8">
    </head>
    <body>
        <p>Hello HTML</p>
    </body>
</html>

2. DOCTYPE

– html version declaration
– ‘html’ means html5

3. html

– web page document

4. head

Place invisible elements

– Title
– Metadata
– External files

5. body

Place visible elements
– Can place HTML Tags

2. HTML Syntax

1. Elements

1. Basic elements

– Basic form


Hello HTML

 

– Structure

1. Start tag :

<p>

2. Contents :

Hello HTML

3. End tag :

</p>

– Tag name is Lower case

2. Nested elements

  • Basic form
<body>
    <p>Hello HTML</p>
</body>

Hello HTML

  • Some elements that can be nested
  • Nested elements form a parent-child relationship.
    • Parents : 
      <body></body>
    • Children : 
       <p></p>
  • Use indentation to represent the nesting depth of the nesting element

3. Empty elements

  • Basic form
<meta charset="utf-8"> 
  • Can’t have contents. Only have attributes
  • Self closing tag

2. Attributes

1. Basic attributes

  • Elements property
  • It can only be placed in the start tag.

2. Global attributes

  • There are common attributes that all elements have
  • Example
    • id, class, hidden, style, …

3. Comments

  • It is not displayed on the screen.
  • It is necessary for the development stage.

“[MOFE] HTML – 2. HTML Basic”의 1개의 생각

  1. Binary options: The shortest route to the world of trading. $ 153 950 Paid to our traders yesterday. Register now and get 10.000 virtual FUNDS in case of right forecast! This is FREE! далее тут x3qpz.tk

답글 남기기

이메일은 공개되지 않습니다. 필수 입력창은 * 로 표시되어 있습니다.