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 and Python each have their own advantages, and choose according to project requirements. 1.PHP is suitable for web development, especially for rapid development and maintenance of websites. 2. Python is suitable for data science, machine learning and artificial intelligence, with concise syntax and suitable for beginners.

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

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 a scripting language widely used on the server side, especially suitable for web development. 1.PHP can embed HTML, process HTTP requests and responses, and supports a variety of databases. 2.PHP is used to generate dynamic web content, process form data, access databases, etc., with strong community support and open source resources. 3. PHP is an interpreted language, and the execution process includes lexical analysis, grammatical analysis, compilation and execution. 4.PHP can be combined with MySQL for advanced applications such as user registration systems. 5. When debugging PHP, you can use functions such as error_reporting() and var_dump(). 6. Optimize PHP code to use caching mechanisms, optimize database queries and use built-in functions. 7

PHP is still dynamic and still occupies an important position in the field of modern programming. 1) PHP's simplicity and powerful community support make it widely used in web development; 2) Its flexibility and stability make it outstanding in handling web forms, database operations and file processing; 3) PHP is constantly evolving and optimizing, suitable for beginners and experienced developers.

PHP and Python each have their own advantages, and the choice should be based on project requirements. 1.PHP is suitable for web development, with simple syntax and high execution efficiency. 2. Python is suitable for data science and machine learning, with concise syntax and rich libraries.

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 suitable for web development, especially in rapid development and processing dynamic content, but is not good at data science and enterprise-level applications. Compared with Python, PHP has more advantages in web development, but is not as good as Python in the field of data science; compared with Java, PHP performs worse in enterprise-level applications, but is more flexible in web development; compared with JavaScript, PHP is more concise in back-end development, but is not as good as JavaScript in front-end development.
