The first day of php learning: HTML; the first day of php: html

Source: Internet
Author: User
Tags color representation

The first day of php learning: HTML; the first day of php: html
2. B/S network mode (structure)

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

3. Introduction to HTML

HTML, HyperText Markup Language, yesSGML. Is a standard, a standard, a sign (Mark).

For example:<B>Beijing Chuanzhi </B>

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

Static webpage Extension:. html. htm

Extensions of dynamic web pages (including server programs):. php. jsp. aspx

 

Hyper Text: text with hyperlinks.

 

4. HTML tag format

Bilateral Tag: <tag attribute 1 = "attribute value 1" attribute 2 = "attribute value 2"> content </Tag>

Example: <font color = "red" size = "5" face = ""> Guangzhou Chuanzhi </font>

Unilateral Tag: <tag attribute = "attribute value">

 

 

What are the characteristics of a person: name, age, education, Graduate School, height, weight, etc.

Similarly, a person is a category, and a person is a specific object in the category.

 

5. Standards for writing HTML tags

1) HTML tags are case-insensitive. We recommend that you use lower-case tags for backward compatibility. Example: <font> <Font> <FONT> <fOnT>

2) A tag can have or has no attribute. If an attribute exists, the attribute and tag are separated by spaces (at least one), and the attribute and tag are separated by spaces. The attribute must be placed in the start tag, but not in the end tag.

For example: <font size = "7" face = ""> </font>

No attribute:

3) attribute values must be enclosed in quotation marks (no quotation marks are required ).

4) The unit (px) is not required for the value attribute of HTML, but the Unit must be added for the Value Attribute of the value in CSS.

In HTML: <table width = "500">

In CSS: <table style = "width: 500px">

5) tags can be nested, but can only beSequential nesting, That is, layer by layer, and cross-Nesting is not allowed.

6. HTML structure of a webpage

<Html>

<Head>

<Title> webpage title </title>

</Head>

<Body>

Subject content of the webpage

</Body>

</Html>

Structure Description:

<Html>

<Head>

<Title> </title> defines the title of a webpage, which is a sub-mark of

<Body> </body> is the subject content of a webpage. 99% of the content or tag in the webpage is placed in <body>. The content in <body> is visible.

 

7. common attributes of <body>

BgColor: Set the webpage background color, for example: <body bgColor = "red">

Background: Set the URL of the background image of a webpage, for example: <body background = "images/bg.gif">

 

8. HTML font Modifier

<B> </B> bold

<I> </I> italic

<U> </u> underline

<S> </s> strike

<Sup> </sup> upload

<Sub> </sub> subscript

<Font> </font> font marker

<Font>Common attributes

Size: font Size. Values: 1-7, 1, and 7.

Color: font Color, for example, red or RGB (255, 0, 0) or # FF0000

Face: font type, for example, face = ""

Example: <font size = "7" color = "red" face = ""> content </font>

<Hr>Horizontal line, which is a unilateral mark

Common attributes:

Size: the width of the horizontal line.

Width: the Width of the horizontal line.

Color: The Color of the horizontal line.

Noshade: solid color display without shadow

 

 

9. Code Editor

1) enhanced Text Editor: Editplus Notepad

Features: small software, less system resources occupied, and syntax color

Disadvantage: no code prompt Function

 

 

2) Integrated IDE development environment: Zend Studio

Features: large software, high system resource occupation, syntax color, code prompt function, PHP program debugging function, database configuration, etc.

Disadvantage: Billing

 

3) Visual webpage code editing tool: Dreamweaver

Step 1: Create a site, site-manage a site

A website is a website that consists of multiple directories or files.

Step 2: Set the code font size CTRL + UEdit -- preferred parameter -- font

Step 3: Set the default encoding when creating a web page:CTRL + UEdit -- preferred parameter -- New Document

UTF-8 is multi-country language encoding, as long as you have the corresponding input method, can display different countries of the language.

 

 

 

How can we ensure that the webpage does not contain garbled characters?

1) Your editor's default encoding, to be set to UTF-8

2) In your HTML code, the <meta> tag also needs to set the corresponding UTF-8 Encoding

3) Your PHP Web Page code should also be set to UTF-8

4) The data encoding that your MySQL reads should also be set to UTF-8

 

Step 4: Set DWDefault browser: CTRL + UEdit -- preferred parameter -- preview in the browser

DOM browser, standard browser, Firefox browser

 

10. webpage Color Representation

Red green blue

Representation in 10: RGB (0,255, 0, 0) RGB (255, 0) RGB)

In hexadecimal notation: # FF0000 #00FF00 # 0000FF

 

RGBColor mode

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

The RGB color mode is also called the color adding mode. Any two colors can be added to produce their own colors.

In a computer, each base color is represented in 1 byte (8-bit binary, for example, 11011011), which can represent 256 (0-brightness levels) colors.

How many colors can RGB be mixed? 256*256*256 = 16.77 million colors

On the webpage:

RED: RGB (255, 0, 0)

Green: RGB (0,255, 0)

Blue: RGB (255)

Yellow: RGB (255,255, 0)

 

 

Binary: 0, 1 operation rule: every two to one

Decimal: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 calculation rules: every ten into one

Hexadecimal: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F calculation rules: every 16th one

The webpage color is represented in hexadecimal format:

RED: # FF0000 uses two hexadecimal digits to represent one decimal digit.

Green: #00FF00

Blue: # 0000FF

Yellow: # FFFF00

 

 

In different browsers, 10Hexadecimal display is incompatible, preferably 16Hexadecimal representation.

In HTML, the color is represented in decimal notation, which has no effect. However, in CSS, the color can be represented in decimal notation.

11. 12. HTML typographical Markup

<P align = "left | center | right"> </p> indicates a paragraph.

<Br> line feed

<Hr noshade size = "5" color = "red"> horizontal line, noshade attribute has no Attribute Value

<H1>

............

<H6>

<H1>Common attributes:

Align: horizontal alignment; values: left, center, and right

 

<Pre> </pre> the pre-typographical mark retains all the white spaces (consecutive spaces or line breaks) of the Code. In other words, the content in the mark will be output in an intact manner.

In PHP<Pre>Empty output is retained.

13. <div> and <span>

These two tags, if used separately, do not have any effect. They should be used in combination with CSS.

Although the two tags have no meaning, they are the most used in DIV + CSS.

It is equivalent to two small containers, which are used to store other content and facilitate layout.

Block and row Elements

Block element: the width of the entire bar is occupied separately. The front and back elements must be formatted in another line. For example: <p>, <Pre>

In-Row Element: Multiple in-row elements are arranged in the same row. The element in the row has no width, and the width is determined by the content. For example, <B> <I> <u> <span> <sub>

 

14. HTML character entity

& Nbsp; represents a halfwidth Space

& Gt; greater

& Lt; Yu no.

& Amp ;&

& Yen; RMB

& Copy; Copyright

& Times; multiplication number

& Divide; division number

 

 

15. Project symbol mark (unordered list): Block Element

<Ul type = "disc">

<Li type = "circle"> content 1 </li>

<Li> content 2 </li>

</Ul>

Common attributes:

Type: the Type of the Project symbol. Values: disc (solid dot), circle (small circle), square (small square)

 

 

16. numbered list (ordered list)

<Ol type =""Start ="3"">

<Li> </li>

<Li> </li>

......

</Ol>

Common attributes:

Type: Number Type, value: 1 (number), a, A, I (little Rome), I (big Rome)

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

 

Reprinted from-chongwei's home location

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.