PHP笔记(HTML篇),php笔记html
PHP笔记(HTML篇),php笔记html
学过很多语言,最近终于决定要学PHP了。
学习PHP,首先总要学习HTML,那么,我也从HTML开始吧!
首先学习任何编程语言,看再多书,都离不开它——帮助文档
HTML帮助文档:http://pan.baidu.com/s/1hqxOymo
不说不知道,近年来比较火的HTML5,是HTML的一个发展方向,HTML的发展方向如下图,一边是多元化的HTML5,另一边是规范化的XML,过程中还衍生了XHTML!
做网页,总避免不了要使用颜色,颜色有两种表示法,单词表示法和十六进制表示法,其中,十六进制表示法表示的颜色比较全,我也整理了一篇博文,以供查看。
RGB颜色表:http://blog.csdn.net/u010849590/article/details/43339473
编程语言总有一些特殊符号不能直接作为文本显示,HTML也不例外,这些特殊符号在HTML中称为实体,博主也整理了一篇HTML实体对照表,供不时之需。
实体对照表:http://blog.csdn.net/u010849590/article/details/43380181
网页代码是由浏览器直接解析的,编写网页必须选择一种编码,常用的编码有UTF-8、GBK、GD2312等,而浏览器也可以选择一种编码去解析网页。那么,问题来了,如果浏览器选择的编码和编写网页的编码不一致怎么办?解决的办法有是三个:
很明显,一种编码不能适合所有人,而让用户修改浏览器编码也不够智能,所以,前两种都是治标不治本,第三种方法才是王道。
是单标签,其用法是
以UTF-8为例:
标签的其他用法,可查看帮助文档。
的属性设置会默认为整个网页的默认设置,可设置字体颜色(text)、背景颜色(bgcolor)、背景图片(background)、背景属性(bgproperties)等,还是查看帮助文档!
是段落标签,这个标签比较特殊,既可用作单标签也可用作双标签。用作双标签时,标签之间的内容作为一段显示;作为单标签时,从标签处开始换行。双标签的用法比较标准,也比较普遍。
标签是双标签,标签内的文本会按照原格式输出,与<xmp>不同,<pre class="brush:php;toolbar:false">标签内的标签是可以被解析的,而<xmp>内的标签是不能解析,以文本形式输出的!</xmp>
和
使用,
标签搭配
标签搭配
和,下标标签和上标标签,均为双标签。
叫做图像标签,用于显示图片,为单标签,src属性设置图片链接,title属性设置鼠标放在上面时显示的名称,alt属性设置图片加载失败显示的名称。其他属性可查帮助文档。
是链接标签,用于超链接,为双标签。href属性设置链接地址,title属性设置标签放在上面时显示的名称,target属性设置打开链接的方式,其他属性,可查看帮助文档。
当前页跳转
跳转到其他页面
URL:统一资源定位符
URL组成:以http://i.cnblogs.com/EditPosts.aspx?postid=4275104&update=1为例
- 协议名称:http://、ftp://、https://、file://等(http://)
- 主机名:(i.cnblogs.com)(cnblogs.com是域名)
- 端口号:80、8080、等(范围:0~65535)(80)
- 资源名称:访问的文件(EditPosts.aspx)
- 参数:"?"后面的键值对,多个参数用"&"连接(get传参,参数可见;post传参,参数不可见)(postid=4275104&update=1)
URL的相对路径:
- ./:代表本地路径
- ../:代表上级路径
- ../../:代表上上级路径(以此类推)
更多属性可查帮助文档。 HTML的框架(frame),也称为分帧,即将多个页面组合成一个页面显示。 框架的标签: 关于框架的其他属性和用法,可查看帮助文档! 表单:可以把输入的数据传送到服务器端的程序的html元素 关于表单的其他属性和用法,可查看帮助文档! 由于常与CSS结合使用,在学习CSS时再深入学习! 至此,HTML的基本元素已经学完了,可以开始制作简单的静态网页了,但是离动态网站还远着呢!接着来学CSS吧!标签用于构建表格,为双标签。width属性设置表格的宽度,heigth属性设置表格的高度,border属性设置表格的边框,cellspacing属性设置单元格之间的宽度,cellpadding属性设置单元格内容与边框之间的距离。
标签嵌套 标签使用,用于设计表格的行,为双标签。
标签嵌套
标签使用,用于表示表格的单元格,为双标签。rowspan属性设置跨行,属性值表示跨越的行数;colspan属性设置跨列,属性值表示跨越的列数。
标签嵌套
标签使用,用于表示表格的表头,单元格的内容字体加粗、居中。
布局显示
超链接

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

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

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











PHP is widely used in e-commerce, content management systems and API development. 1) E-commerce: used for shopping cart function and payment processing. 2) Content management system: used for dynamic content generation and user management. 3) API development: used for RESTful API development and API security. Through performance optimization and best practices, the efficiency and maintainability of PHP applications are improved.

PHP is mainly procedural programming, but also supports object-oriented programming (OOP); Python supports a variety of paradigms, including OOP, functional and procedural programming. PHP is suitable for web development, and Python is suitable for a variety of applications such as data analysis and machine learning.

PHP and Python have their own advantages and disadvantages, and the choice depends on project needs and personal preferences. 1.PHP is suitable for rapid development and maintenance of large-scale web applications. 2. Python dominates the field of data science and machine learning.

PHP is used to build dynamic websites, and its core functions include: 1. Generate dynamic content and generate web pages in real time by connecting with the database; 2. Process user interaction and form submissions, verify inputs and respond to operations; 3. Manage sessions and user authentication to provide a personalized experience; 4. Optimize performance and follow best practices to improve website efficiency and security.

PHP uses MySQLi and PDO extensions to interact in database operations and server-side logic processing, and processes server-side logic through functions such as session management. 1) Use MySQLi or PDO to connect to the database and execute SQL queries. 2) Handle HTTP requests and user status through session management and other functions. 3) Use transactions to ensure the atomicity of database operations. 4) Prevent SQL injection, use exception handling and closing connections for debugging. 5) Optimize performance through indexing and cache, write highly readable code and perform error handling.

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.

PHP is suitable for web development and rapid prototyping, and Python is suitable for data science and machine learning. 1.PHP is used for dynamic web development, with simple syntax and suitable for rapid development. 2. Python has concise syntax, is suitable for multiple fields, and has a strong library ecosystem.

PHP originated in 1994 and was developed by RasmusLerdorf. It was originally used to track website visitors and gradually evolved into a server-side scripting language and was widely used in web development. Python was developed by Guidovan Rossum in the late 1980s and was first released in 1991. It emphasizes code readability and simplicity, and is suitable for scientific computing, data analysis and other fields.
