I have learned many languages, and recently I finally decided to learn PHP.
To learn PHP, you must first learn HTML, so I will start with HTML too!
First learn any programming language. No matter how many books you read, you can’t do without it - Help Document
HTML help document: http://pan.baidu.com/s/1hqxOymo
If you don’t tell me, you don’t know. HTML5, which has been popular in recent years, is a development direction of HTML. The development direction of HTML is as shown below. One side is diversified HTML5, and the other side is standardized XML. There are also derivatives in the process. XHTML!
When making web pages, you can’t avoid using colors. There are two ways to express colors, word expression and hexadecimal notation. Among them, hexadecimal notation can express more complete colors. I also Put together a blog post for review.
RGB color table: http://blog.csdn.net/u010849590/article/details/43339473
There are always some special symbols in programming languages that cannot be displayed directly as text, and HTML is no exception. These special symbols are called entities in HTML. The blogger also compiled an HTML entity comparison table for emergencies. .
Web page code is directly parsed by the browser. You must choose an encoding to write a web page. Commonly used encodings include UTF-8, GBK, GD2312, etc., and the browser can also choose an encoding to parse the web page. So, the question is, what if the encoding selected by the browser is inconsistent with the encoding used to write the web page? There are three solutions:
Obviously, one encoding does not fit everyone, and it is not smart enough to let users modify the browser encoding. Therefore, the first two methods only treat the symptoms but not the root cause, and the third method is the way to go.
is a single tag, its usage is
Take UTF-8 as an example:
For other uses of the
tag, please view the help documentation.
The
tag can be used to set hyperlinks, such as changing relative paths to absolute paths, opening methods, etc. is a single tag. Please refer to the help document for its specific usage.
The attribute settings of
will default to the default settings of the entire web page. You can set the font color (text), background color (bgcolor), background image (background), background properties (bgproperties), etc., or Check out the help documentation!
is a paragraph tag. This tag is quite special and can be used as either a single tag or a double tag. When used as a double label, the content between the labels is displayed as a section; when used as a single label, line breaks start from the label. The usage of double labels is relatively standard and common.
tag is a double tag. The text in the tag will be output in the original format. Unlike , the tags in
tag can be parsed, while
tags are used with and
.
is a list tag, which is a double tag. The content between the tags is used as one of the lists. Items are displayed and are unordered by default; the tag is used with the
tag to turn the list into an ordered list; the
tag is used with
as an unordered list group. The properties of these tags can be found in the help documentation.
and , subscript tags and superscript tags, are both double tags.
is called an image tag, which is used to display images. It is a single tag. The src attribute sets the image link, the title attribute sets the name displayed when the mouse is placed on it, and the alt attribute sets the name displayed when the image fails to load. . Other properties can be found in the help documentation.
URL composition: Take http://i.cnblogs.com/EditPosts.aspx?postid=4275104&update=1 as an example
Protocol name: http://, ftp://, https://, file://, etc. (http://)
Host name: (i.cnblogs.com) (cnblogs.com is the domain name)
Port number: 80, 8080, etc. (range: 0~65535) (80)
Resource name: Accessed file (EditPosts.aspx)
Parameter: the key-value pair after "?", multiple parameters are connected with "&" (get parameter is passed, the parameter is visible; post parameter is passed, the parameter is invisible) (postid=4275104&update=1)
Relative path of URL:
./: represents the local path
../: represents the superior path
../../: represents the superior path (and so on)
tag is used to build a table and is a double tag. The width attribute sets the width of the table, the height attribute sets the height of the table, the border attribute sets the border of the table, the cellspacing attribute sets the width between cells, and the cellpadding attribute sets the distance between the cell content and the border.
Label nesting
label is used to design the rows of the table, which is a double label.
Label nesting
label is used to represent the cells of the table, which is a double label. The rowspan attribute is set across rows, and the attribute value indicates the number of rows spanned; the colspan attribute is set across columns, and the attribute value indicates the number of columns spanned.
Label nesting
label is used to represent the header of the table, and the content of the cell is bold and centered.
For more attributes, please check the help documentation.
HTML frame, also known as framing, combines multiple pages into one page for display.
Advantages:
When reloading the page, there is no need to reload the entire page, which increases the speed of web page download
Easy to create navigation bar
Disadvantages:
Multiple pages, difficult to manage
The code is complex and cannot be indexed by search engines
Multi-frame pages will increase the server’s http requests
Small mobile devices cannot fully display
Due to the above shortcomings, it does not conform to standard web design concepts and has been abandoned. However, it can be used in the background, so you still need to learn.
Frame tag:
tag, double tag
is used to display the content of each page, nested in ;
The src attribute sets the path of the page to display its content
The name attribute can set the name of the frame for link display
When the browser cannot load frames, the content in the tag will be displayed
is nested in the tag and used with the tag
For other properties and usage of the frame, please view the help documentation!
Form: HTML element that can transmit input data to the server-side program
tag, single tag
type, represents the display mode of an input field (divided into input type, selection type, click type)
text, single line text input field, input type
password, password input field, the entered characters are displayed as "*", input type
file, file upload, input type
checkbox, check box, selection type
radio, radio button, selection type
hidden, hidden field, generally used to pass default values,
Button, button, click will not submit the form, you can perform other operations, click type
image, image button, click will submit the form, click type
submit, submit button, click to submit the form, click type
reset, reset button, click type
name, the name of the form item
Usually set to be the same as the corresponding field name in the database
This attribute is not required for click type
Identifier when transmitting data
The name value of the check box is generally represented by an array
When the name values of the radio button boxes are the same, the options are mutually exclusive
value, the value of the form item
Selective setting of this attribute value. After selection, it can be transmitted with the form
For click type except image, set this attribute, that is, set the button display name
Input type sets the attribute value and sets the default value
maxlength, limit text input length
tag can be set to bind text and options, so that you can select by clicking on the text
For other properties and usage of the form, please view the help documentation!
tag, double tag
Layer tags, used to position elements or layouts
The content in the layer can be placed anywhere in the browser, and HTML elements can be placed
Often used in combination with CSS
Since it is often used in conjunction with CSS, learn more when learning CSS!
At this point, you have learned the basic elements of HTML and you can start making simple static web pages, but you are still far from a dynamic website! Let’s learn CSS next!
http://www.bkjia.com/PHPjc/956929.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/956929.htmlTechArticlePHP notes (HTML), php notes html I have learned many languages, and recently I finally decided to learn PHP. To learn PHP, you must first learn HTML, so I will start with HTML too! First learn anything...
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn