Front-end basis - study notes HTML

HTML, called the "Hyper Text Markup Language" Hypertext Markup Language. The main content of the page is to be described in the text, images and sounds through the label.

html basic overview

The basic framework:

<!DOCTYPE html>	//html5标准
<html lang="zh-cn">	//网页的语言标识,zh-cn代表中文,en代表英文
<head>	//头部标签主要存储一些网页的信息,比如编码,标题等
    <meta charset="UTF-8">	//字符集
    <title>Document</title>	//标题
</head>
<body>	//body标签中存放网页的主要内容
    
</body>
</html>

About character sets:
UTF-8 is the most common character set encoding, commonly used character set encoding gbk there and GB2312
GB2312 Simplified Chinese, including the 6763 commonly used Chinese characters
BIG5 Traditional Chinese, Hong Kong, Macao and Taiwan regions use
GBK includes all Chinese characters is an extension GB2312, adding support for complex characters, compatible GB2312
UTF-8 character contains almost all countries in need

html Core: tag (element with <>), and a function of indicating a coding

1. ditag
<tag name> SUMMARY </ tag name>
Example: <h1 of> and </ h1>

2 single tag
<tag name />
Example: <br />

Label relations
1. nested relationship
2. parallel relationship

Label Properties:
<1 tag attribute = "attribute value 1" Attribute 1 = "attribute value 1" ...> Content </ tab>
before and after the attribute regardless, a space interval

Common Tags:

Title tags <h1> - <h6>
Font progressively smaller, h1 is only a general one page for logo

The paragraph tag <p> SUMMARY </ p>

Horizontal tag <hr />

Break tag <br />

Layout tab
<div> contents </ div> (actually a box)
<span> SUMMARY </ span>

Text formatting tags:
<B> </ B>, <strong> </ strong> embodiment shown in bold text
<i> </ i>, <em> </ em> text displayed in italic
<s> < / s>, <del> < / del> text strikethrough
<u> </ u>, <ins> </ ins> text underline

Image tag <img>
<img src = "image path"> src label img must attribute specifies the image file path and file name of the
relative path :
images and files in the same directory level, only you need to enter the picture name, such as : src = "picture name .jpg"
image in a file, you need to add pictures folder name, such as src = "img / picture name .jpg"
image on the document level, you need to add before the name of the picture ... / such as src = "... / picture name .jpg"
absolute path :
from the beginning to the full path of the letter or complete picture of network addresses.

Attributes Property Value description
src URL Image path
alt text Alternatively the image can not be displayed when text
title text What is displayed when the mouse hovers
width Pixels Image width setting
height Pixels Setting the height of the image (typically width and height provided only a)
border digital Border width setting image

Video tag
<audio> </ audio> can only play audio
<video> </ video> Audio video available
<embed> </ embed> flash animation

Link tag <a>

<a href="跳转目标" target="目标窗口的弹出方式">文本或内容</a>

target values have self, blank. The default value is self represented on this page jumps, blank to jump in a new window.
href = "#" represents an empty link, that will not jump click
href = "# id name" to jump to that point in the page id tag

base label

<base target="_blank"> 设置整体连接的打开状态为blank

Special characters commonly used tags

Special characters description Code
Whitespace &nbsp;
< Less than sign &lt;
> Greater than sign &gt;
& And number &amp;
¥ Renminbi &yen;
© copyright &copy;
® Trademark &reg;
° Celsius & You;
± Sign &plusmn;
× Multiplication sign &times;
÷ Sign of division &divide;
² The standard two &sup2;
³ Superscript three &sup3;

Comment tags

<!-- 注释语句 -->

Guess you like

Origin blog.csdn.net/qq_43813560/article/details/88645483