Getting Started with HTML Introduction

Introduction to HTML

definition:

Hypertext markup language (html) is an application under the Standard Generalized Markup Language, is a specification, a standard

It is represented by reference numeral of each part of the page, the page file is a text file itself, by adding a tag in a text file, can tell the browser how to display the contents (such as: how word processing, how to arrange the screen, how to display images, etc.). Web browser in order to read the file, and then according to the label symbol interpretation and display the contents of its mark, the mark of a writing error will not point out a mistake, do not pause to explain its execution, writers can only be analyzed by the error cause display and error location, but it should be noted that, for different browsers on the same tag may be explained not identical, and thus may have different display.

 

Features:

  1. Simplicity: html version upgrade using a superset of the way, which is more flexible and convenient
  2. Scalability: widely html brings enhancements to increase the identifier and other requirements, take the form of a subclass of elements, bringing assurance system expansion
  3. Another reason for the popularity of personal computers though, but the use of other machines and so a lot of people mac, html can be used on a wide range of platforms, which is the World Wide Web (www) prevailed: platform independence
  4. Versatility: html is the language network, a simple, common-wide home Markup Language, which allows producers to build complex web pages of text and pictures combination, these pages can be used by any other person to browse the Internet, regardless of What kind of computer or browser

Simple to understand: As we write python code, you need an interpreter to translate runtime, then html code interpreter is the browser, but their different interpretation of the rules.

 

structure:

<! DOCTYPE html > #html document type, this wording is html5
 < html > 
    < head > 

    </ head > 
    < body > 

    </ body > 
</ html > 
<-! 
In html html and the beginning and end, the intermediate head comprising and body, if the person seen as html, then the head is the head, body is the body, so head there are things are generally invisible. 
<head> content between the </ head> and is the title meta information and meta-information sites generally do not show up, but recorded a lot of useful information in the HTML file 
<body> and </ body> between the content is presented in the browser, users see page effects. That this is the body of the page. That is the meaning of physical body. 
->

 

 

HTML tags

refers html tags: <head>, objects <body>, <table> and the like is enclosed in angle brackets, most of the tags are in pairs, such as <table> </ talbe>, <form> </ form>, of course, not a small number of pairs, such as <br>, <hr> and the like, can be nested tags, such as tag nested form within the body tag, in the form of other labels can nest

 

Tags Categories

Syntax by Category:

  • Closing tag: indicates the start and end tags have to be paired, such as the above <html> </ html>
  • The self-closing tags: the presence of a single label, their closure, such as a, here without / Error not

 

head tag

head head tag is included in the title page, preface, description, etc., not to display it as the content itself, but affect the results page displayed

The head is most commonly used tags <title> and <meta> tag

  • Title <title> is used to define a web page, its content is displayed in the title bar of the window page, page title can be used as a browser bookmarks and favorites list
    <title>hello world</title>

 

  • <Meta> to define the relationship between documents and external resources, provide meta information about the page, such as: page encoding, refresh, jump for search engines and the frequency of updating the description and keywords, page transcoding
    <! - set the encoding -> 
    < Meta charset = "UTF-. 8" > 
    <! - automatically refreshes -> 
    < Meta HTTP-equiv = "the Refresh" Content = ". 3" >   <! - . 3 seconds refresh the page -> 
    <! - jump -> 
    < Meta HTTP-equiv = "refresh" Content = "3; the Url = HTTP: //www.baidu.com" >  <! - after 3 seconds Jump to www.baidu.com -> 
    <-! keyword information -> 
    < Meta name = "keywords" content="this is key word">
    <!--兼容IE:X-UA-Compatible-->
    <meta http-equiv="X-UA-Compatible" content="IE=IE9;IE=IE8;IE=EmulateIE7" />

     

  • link
    <link rel="stylesheet" href="css/common.css">   <!-- 样式 -->
    <link rel="shortcut icon" href="image/favicon.ico">  <!-- 图标 -->

     

 

Guess you like

Origin www.cnblogs.com/kaichenkai/p/11266146.html