Home  >  Article  >  Web Front-end  >  HTML on the first day of learning PHP

HTML on the first day of learning PHP

WBOY
WBOYOriginal
2016-09-14 09:24:121565browse

2.B/S network mode (structure)

B/S, browser/Server browser/server structure. In this mode, the client does not need to install any software (except browser software), and all other functions are concentrated on the server. There is essentially zero maintenance on the client side.

HTML on the first day of learning PHP

HTML on the first day of learning PHP

3.HTML Introduction

HTML, HyperText Markup Language, is an application of SGML. It is a standard, a norm, and a sign (mark).

For example: Beijing Chuanzhi

The function of various tags is to tell the browser how to display this content.

HTML on the first day of learning PHP

Static web page extension: .html .htm

Extensions of dynamic web pages (including server-side programs): .php .jsp .aspx, etc.

Hypertext: refers to text with hyperlinks added.

4.Format of HTML tag

Bilateral tag: content

Example:Guangzhou Chuanzhi

One-sided tag:

What characteristics does a person have: name, age, education, graduate school, height, weight, etc.

Similarly: People are a category, and Zhang San is a specific object in the category.

5. Specifications for writing HTML tags

1) HTML tags are not case-sensitive. It is recommended that you use lowercase for backward compatibility. Such as:

2) A mark can have attributes or not. If there are attributes, use spaces to separate attributes and tags (at least one), and separate attributes from attributes with spaces. Attributes must be placed in the opening tag and cannot be placed in the closing tag.

For example:

No attribute:

3) Under normal circumstances, attribute values ​​need to be enclosed in quotation marks (it is not a mistake not to add them).

4) The numerical attribute value of HTML does not need to be added with a unit (px), but the numerical attribute value in CSS must be added with a unit.

Writing in HTML:

Writing in CSS:

5) Markers can be nested, but they can only be nested in order, that is, one layer within another, and no cross-nesting is allowed.

6. HTML structure of a web page

Webpage title

The main content of the webpage

Structure description:

When the browser encounters this tag, it will translate the content according to the web page format. Contains two sub-tags: and

defines the header information of the web page file. The content in this tag is invisible in the browser and generally plays a special role.

defines the title of the web page and is the sub-tag of .

is the main content of the webpage. 99% of the content or tags in the webpage are placed in . The content within is visible.

7. Commonly used attributes of

bgColor: Set the background color of the web page, such as:

background: Set the background image URL of the web page, for example:

8.HTML font modification tag

bold bold

italic

underline

strike strike

superscript

subscript

Font tag

Commonly used attributes

Size: Font size, value: 1-7, 1 small and 7 large.

Color: font color, such as: red or RGB(255,0,0) or #FF0000

Face: font type, such as: face="Heilong"

Example:Content


The horizontal line is a unilateral mark

Commonly used attributes:

Size: The thickness of the horizontal line

Width: width of horizontal line

Color: Color of horizontal line

noshade: solid color display without shadow effect

9. Code Editor

1) Enhanced text editor: Editplus Notepad

Features: Small software, less system resource usage, syntax color

Disadvantages: No code prompt function

2) IDE integrated development environment: Zend Studio

Features: The software is large, takes up a lot of system resources, syntax color, code prompt function, PHP program debugging function, database configuration, etc.

Disadvantage: Charge

3) Visual web page code editing tool: Dreamweaver

Step one: Create a site, site - manage site

A site is a website, and a website consists of multiple directories or files.

HTML on the first day of learning PHP

Step 2: Set the code font size CTRL+U Edit - Preferred Parameters - Font

HTML on the first day of learning PHP

Step 3: Set the default encoding when creating a new web page: CTRL+U Edit - Preferred Parameters - New Document

HTML on the first day of learning PHP

UTF-8 is a multi-language encoding. As long as you have the corresponding input method, you can display languages ​​​​in different countries.

How to ensure that the web page does not have garbled characters?

1) The default encoding of your editor should be set to UTF-8

2) In your HTML code, the tag must also set the corresponding UTF-8 encoding

3) The encoding of your PHP web page must also be set to UTF-8

4) The data encoding read by your MySQL must also be set to UTF-8

Step 4: Set the default browser for DW: CTRL+U Edit - Preferred parameters - Preview in browser

HTML on the first day of learning PHP

DOM browser, standard browser, Firefox browser

10.Web page color representation

Use English words to express: red green blue

Represented in decimal: RGB(255,0,0) RGB(0,255,0) RGB(0,0,255)

Represented in hexadecimal: #FF0000 #00FF00 #0000FF

RGBColor Mode

All colors in nature can be made by mixing three primary colors: red (R), green (G), and blue (B). RGB is also called the three primary colors.

RGB color mode, also called additive color mode. The addition of any two colors can produce other colors.

In computers, each primary color is represented by 1 byte (8-bit binary, assuming such as 11011011), which can represent a total of 256 (0-255 brightness levels) colors

RGB共可以混合出多少种颜色? 256 * 256 *256=1677万种色

在网页中的写法:

红色:RGB(255,0,0)

绿色:RGB(0,255,0)

蓝色:RGB(0,0,255)

黄色:RGB(255,255,0)

 

 

二进制:0、1                                                   运算规则:逢二进一

十进制:0、1、2、3、4、5、6、7、8、9                           运算规则:逢十进一

十六进制:0、1、2、3、4、5、6、7、8、9、A、B、C、D、E、F     运算规则:逢十六进一

网页颜色用十六进制表示:

红色:#FF0000       用两位16进制来表示1位10进制

绿色:#00FF00

蓝色:#0000FF

黄色:#FFFF00

 

 

在不同的浏览器下,10进制显示存在不兼容性,最好的是16进制表示方法。

在HTML中10进制表示颜色,没有效果;但在CSS中可以使用10进制表示。

11. HTML on the first day of learning PHP

12.HTML排版标记

代表一个段落


换行


水平线,noshade属性没有属性值

:一级标题最大

…………

六级标题最小

常用的属性:

align:水平对齐,取值: left、center、right

 

预排版标记,将保留代码所有的空白(连续的空格或换行),换句话说:该标记中的内容会原封不动的输出。

在PHP中输出数组时,用

保留空白输出。

HTML on the first day of learning PHP

13.

这两个标记,如果单独使用,没有任何效果,一般要结合CSS来使用。

这两个标记,虽然没有任何意义,但在DIV+CSS中又是用的最多的。

相当于两个小的容器,里面用来存放其它内容,方便排版布局。

块元素和行内元素

块元素:单独占取通栏的宽度,前后的元素必须另起一行排版。比如:

行内元素:多个行内元素排在同一行,行内元素没有宽度,宽度是由内容来决定。比如:

 

14.HTML字符实体

      代表一个半角空格

>       大于号

<        小于号

&      &

¥       人民币

©      版权

×      乘号

÷       除号

 

 

15.项目符号标记(无序列表):块元素

  • 内容1
  • 内容2

常用的属性:

Type: Type of bullet, values: disc (solid dot), circle (small circle), square (small square)

16. Numbered list (ordered list)

    “a” start=“3”>

          

  •           

  • ​​​​​​……

    Commonly used attributes:

    Type: Number type, values: 1 (number), a, A, i (little Rome), I (big Rome)

    Start: The starting number of the number, this value is a number. For example: start=3

    Reprinted from - Chongwei Private Area
  • Statement:
    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