Note_Tech

All technological notes.


Project maintained by simonangel-fong Hosted on GitHub Pages — Theme by mattgraham

HTML - Fundamental

Back


Two types of pages

  1. Static pages

    • The content in pages cant be changed;
    • Everyone see same content  
  2. Dynamic pages

    • The content are connected to the database which return different data e.g.: hotel.com different people have different contents. php 不用学, 所以主要学 html, css, js, Jquery  

HTML File

HTML files end with the extension of .html.


HTML Page Structure

<!-- All HTML documents must start with a document type declaration that 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). -->
<!-- not case sensitive -->
<!DOCTYPE html>

<!-- The HTML document itself begins with <html> and ends with </html>. It is the root element of an HTML page -->
<html>
  <!-- The element contains meta information about the HTML page -->
  <head>
    <!-- element specifies a title for the HTML page -->
    <title>Page Title</title>
  </head>
  <!-- The visible part of the HTML document is between <body> and </body>. -->
  <body>
    <!-- element defines a large heading -->
    <h1>My First Heading</h1>
    <!-- element defines a paragraph -->
    <p>My first paragraph.</p>
  </body>
</html>

structure


HTML Element


Nested HTML Elements


Comment

HTML comments are not displayed in the browser, but they can help document your HTML source code.

<!-- this is a comment line. -->

Attribute

Attribute Description
<a href=""></a> URL that the link goes to
<img src=""> Source of image
<img alt=""> Alternate of image

TOP