search
HomeWeb Front-endHTML TutorialHTML on the first day of learning PHP

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
    The Future of HTML, CSS, and JavaScript: Web Development TrendsThe Future of HTML, CSS, and JavaScript: Web Development TrendsApr 19, 2025 am 12:02 AM

    The future trends of HTML are semantics and web components, the future trends of CSS are CSS-in-JS and CSSHoudini, and the future trends of JavaScript are WebAssembly and Serverless. 1. HTML semantics improve accessibility and SEO effects, and Web components improve development efficiency, but attention should be paid to browser compatibility. 2. CSS-in-JS enhances style management flexibility but may increase file size. CSSHoudini allows direct operation of CSS rendering. 3.WebAssembly optimizes browser application performance but has a steep learning curve, and Serverless simplifies development but requires optimization of cold start problems.

    HTML: The Structure, CSS: The Style, JavaScript: The BehaviorHTML: The Structure, CSS: The Style, JavaScript: The BehaviorApr 18, 2025 am 12:09 AM

    The roles of HTML, CSS and JavaScript in web development are: 1. HTML defines the web page structure, 2. CSS controls the web page style, and 3. JavaScript adds dynamic behavior. Together, they build the framework, aesthetics and interactivity of modern websites.

    The Future of HTML: Evolution and Trends in Web DesignThe Future of HTML: Evolution and Trends in Web DesignApr 17, 2025 am 12:12 AM

    The future of HTML is full of infinite possibilities. 1) New features and standards will include more semantic tags and the popularity of WebComponents. 2) The web design trend will continue to develop towards responsive and accessible design. 3) Performance optimization will improve the user experience through responsive image loading and lazy loading technologies.

    HTML vs. CSS vs. JavaScript: A Comparative OverviewHTML vs. CSS vs. JavaScript: A Comparative OverviewApr 16, 2025 am 12:04 AM

    The roles of HTML, CSS and JavaScript in web development are: HTML is responsible for content structure, CSS is responsible for style, and JavaScript is responsible for dynamic behavior. 1. HTML defines the web page structure and content through tags to ensure semantics. 2. CSS controls the web page style through selectors and attributes to make it beautiful and easy to read. 3. JavaScript controls web page behavior through scripts to achieve dynamic and interactive functions.

    HTML: Is It a Programming Language or Something Else?HTML: Is It a Programming Language or Something Else?Apr 15, 2025 am 12:13 AM

    HTMLisnotaprogramminglanguage;itisamarkuplanguage.1)HTMLstructuresandformatswebcontentusingtags.2)ItworkswithCSSforstylingandJavaScriptforinteractivity,enhancingwebdevelopment.

    HTML: Building the Structure of Web PagesHTML: Building the Structure of Web PagesApr 14, 2025 am 12:14 AM

    HTML is the cornerstone of building web page structure. 1. HTML defines the content structure and semantics, and uses, etc. tags. 2. Provide semantic markers, such as, etc., to improve SEO effect. 3. To realize user interaction through tags, pay attention to form verification. 4. Use advanced elements such as, combined with JavaScript to achieve dynamic effects. 5. Common errors include unclosed labels and unquoted attribute values, and verification tools are required. 6. Optimization strategies include reducing HTTP requests, compressing HTML, using semantic tags, etc.

    From Text to Websites: The Power of HTMLFrom Text to Websites: The Power of HTMLApr 13, 2025 am 12:07 AM

    HTML is a language used to build web pages, defining web page structure and content through tags and attributes. 1) HTML organizes document structure through tags, such as,. 2) The browser parses HTML to build the DOM and renders the web page. 3) New features of HTML5, such as, enhance multimedia functions. 4) Common errors include unclosed labels and unquoted attribute values. 5) Optimization suggestions include using semantic tags and reducing file size.

    Understanding HTML, CSS, and JavaScript: A Beginner's GuideUnderstanding HTML, CSS, and JavaScript: A Beginner's GuideApr 12, 2025 am 12:02 AM

    WebdevelopmentreliesonHTML,CSS,andJavaScript:1)HTMLstructurescontent,2)CSSstylesit,and3)JavaScriptaddsinteractivity,formingthebasisofmodernwebexperiences.

    See all articles

    Hot AI Tools

    Undresser.AI Undress

    Undresser.AI Undress

    AI-powered app for creating realistic nude photos

    AI Clothes Remover

    AI Clothes Remover

    Online AI tool for removing clothes from photos.

    Undress AI Tool

    Undress AI Tool

    Undress images for free

    Clothoff.io

    Clothoff.io

    AI clothes remover

    Video Face Swap

    Video Face Swap

    Swap faces in any video effortlessly with our completely free AI face swap tool!

    Hot Tools

    DVWA

    DVWA

    Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

    Notepad++7.3.1

    Notepad++7.3.1

    Easy-to-use and free code editor

    Safe Exam Browser

    Safe Exam Browser

    Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

    SublimeText3 Linux new version

    SublimeText3 Linux new version

    SublimeText3 Linux latest version

    mPDF

    mPDF

    mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),