Home >Backend Development >PHP Tutorial >PHP notes (HTML), php notes html_PHP tutorial

PHP notes (HTML), php notes html_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 10:07:12935browse

PHP notes (HTML), php notes html

I have learned many languages, and recently I finally decided to learn PHP.

To learn PHP, you must first learn HTML, so I will start with HTML too!

First learn any programming language. No matter how many books you read, you can’t do without it - Help Document

HTML help document: http://pan.baidu.com/s/1hqxOymo

If you don’t tell me, you don’t know. HTML5, which has been popular in recent years, is a development direction of HTML. The development direction of HTML is as shown below. One side is diversified HTML5, and the other side is standardized XML. There are also derivatives in the process. XHTML!

PHP notes (HTML), php notes html_PHP tutorial When making web pages, you can’t avoid using colors. There are two ways to express colors, word expression and hexadecimal notation. Among them, hexadecimal notation can express more complete colors. I also Put together a blog post for review.

RGB color table: http://blog.csdn.net/u010849590/article/details/43339473

There are always some special symbols in programming languages ​​that cannot be displayed directly as text, and HTML is no exception. These special symbols are called entities in HTML. The blogger also compiled an HTML entity comparison table for emergencies. .

Entity comparison table: http://blog.csdn.net/u010849590/article/details/43380181

Web page code is directly parsed by the browser. You must choose an encoding to write a web page. Commonly used encodings include UTF-8, GBK, GD2312, etc., and the browser can also choose an encoding to parse the web page. So, the question is, what if the encoding selected by the browser is inconsistent with the encoding used to write the web page? There are three solutions:

Obviously, one encoding does not fit everyone, and it is not smart enough to let users modify the browser encoding. Therefore, the first two methods only treat the symptoms but not the root cause, and the third method is the way to go.

is a single tag, its usage is

Take UTF-8 as an example:

For other uses of the

tag, please view the help documentation.

The

tag can be used to set hyperlinks, such as changing relative paths to absolute paths, opening methods, etc. is a single tag. Please refer to the help document for its specific usage.

The attribute settings of

will default to the default settings of the entire web page. You can set the font color (text), background color (bgcolor), background image (background), background properties (bgproperties), etc., or Check out the help documentation!

is a paragraph tag. This tag is quite special and can be used as either a single tag or a double tag. When used as a double label, the content between the labels is displayed as a section; when used as a single label, line breaks start from the label. The usage of double labels is relatively standard and common.

 tag is a double tag. The text in the tag will be output in the original format. Unlike , the tags in <pre class="brush:php;toolbar:false"> tag can be parsed, while <xmp&gt The tags inside ; cannot be parsed and are output in text form! </span></p>
<p> </p>
<p><span class="Apple-style-span"><li> tags are used with <ol> and <ul>. <li><span class="Apple-style-span"> is a list tag, which is a double tag. The content between the tags is used as one of the lists. Items are displayed and are unordered by default; the <ol> tag is used with the <li> tag to turn the list into an ordered list; the <ul> tag is used with <li> as an unordered list group. The properties of these tags can be found in the help documentation. </span></span></p>
<p> </p>
<p><span class="Apple-style-span"><sub> and <sup>, subscript tags and superscript tags, are both double tags. </span></p>
<p> </p>
<p><span class="Apple-style-span"><img> is called an image tag, which is used to display images. It is a single tag. The src attribute sets the image link, the title attribute sets the name displayed when the mouse is placed on it, and the alt attribute sets the name displayed when the image fails to load. . Other properties can be found in the help documentation. </span></p>
<p> </p>
<p><span class="Apple-style-span"><a> is a link tag, used for hyperlinks, and is a double tag. The href attribute sets the link address, the title attribute sets the name displayed when the label is placed on it, the target attribute sets the way to open the link, and for other attributes, please view the help document <span class="Apple-style-span">. </span></span></p>
The <p><span class="Apple-style-span"><a> tag sets the anchor point for linking to a specific area, using the name attribute. <span class="Apple-style-span">name sets a name, and the <span class="Apple-style-span">href attribute is set to "#<span class="Apple-style-span">" + the name of <span class="Apple-style-span">name, which will link to the name of this page; if the href is set to the web page path + "#"+ name, it can be linked to the name of the web page; when the herf attribute is set to "#" or empty, it will jump to the head of this page. </span></span></span></span></span></p>
<p><span class="Apple-style-span"><img  alt="PHP notes (HTML), php notes html_PHP tutorial" ><span class="Apple-style-span"><span class="Apple-style-span">Current page jump</span></span></span></p>
<p><img src="http://img.blog.csdn.net/20150205000000815?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvdTAxMDg0OTU5MA==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt=""></p>
<p><span class="Apple-style-span"><span class="Apple-style-span">Jump to other pages</span></span></p>
<p> </p>
<p><span class="Apple-style-span"><span class="Apple-style-span">URL: Uniform Resource Locator </span></span></p>
<p><span class="Apple-style-span"><span class="Apple-style-span">URL composition: Take http://i.cnblogs.com/EditPosts.aspx?postid=4275104&update=1 as an example</span></span></p>
<ul>
<li>Protocol name: http://, ftp://, https://, file://, etc. (http://) </li>
<li>Host name: (i.cnblogs.com) (cnblogs.com is the domain name) </li>
<li>Port number: 80, 8080, etc. (range: 0~65535) (80) </li>
<li>Resource name: Accessed file (EditPosts.aspx) </li>
<li>Parameter: the key-value pair after "?", multiple parameters are connected with "&" (get parameter is passed, the parameter is visible; post parameter is passed, the parameter is invisible) (postid=4275104&update=1) </li>
</ul>
<p> </p>
<p><span>Relative path of URL: </span></p>
<ul>
<li><span>./: represents the local path </span></li>
<li><span>../: represents the superior path </span></li>
<li><span>../../: represents the superior path (and so on) </span></li>
</ul>
<p> </p>
<p><span><table> tag is used to build a table and is a double tag. The width attribute sets the width of the table, the height attribute sets the height of the table, the border attribute sets the border of the table, the cellspacing attribute sets the width between cells, and the cellpadding attribute sets the distance between the cell content and the border. </span></p>
<p><span><tr> Label nesting <table> label is used to design the rows of the table, which is a double label. </span></p>
<p><span><td> Label nesting<tr> label is used to represent the cells of the table, which is a double label. The rowspan attribute is set across rows, and the attribute value indicates the number of rows spanned; the colspan attribute is set across columns, and the attribute value indicates the number of columns spanned. </span></p>
<p><span><th> Label nesting <tr> label is used to represent the header of the table, and the content of the cell is bold and centered. </span></p>
<p><span>For more attributes, please check the help documentation. </span></p>
<p> <img src="http://img.blog.csdn.net/20150207010615583?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvdTAxMDg0OTU5MA==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt=""></p>
<p> </p>
<p>HTML frame, also known as framing, combines multiple pages into one page for display. </p>
<ul>
<li>Advantages:
<ul>
<li>When reloading the page, there is no need to reload the entire page, which increases the speed of web page download</li>
<li>Easy to create navigation bar</li>
</ul>
</li>
<li>Disadvantages:
<ul>
<li>Multiple pages, difficult to manage</li>
<li>The code is complex and cannot be indexed by search engines</li>
<li>Multi-frame pages will increase the server’s http requests</li>
<li>Small mobile devices cannot fully display </li>
</ul>
</li>
<li>Due to the above shortcomings, it does not conform to standard web design concepts and has been abandoned. However, it can be used in the background, so you still need to learn. </li>
</ul>
<p>Frame tag: </p>
<ul>
<li><frameset> tag, double tag
<ul>
The <li><frameset> tag replaces the <body> tag and defines the frame page, so using the <frameset> tag eliminates the need for the <body> tag </li>
<li>The border attribute sets the size of the frame border</li>
<li>The rows attribute sets the number of rows and height of the frame. Write as many rows as you need. "*" represents the remaining space, separated by ","</li>
<li>The cols attribute sets the number and width of the frame's columns. Write as many columns as you need. "*" represents the remaining space, separated by ","</li>
<li><frameset> can be nested to diversify the frame format</li>
</ul>
</li>
<li><frame> tag, double tag
<ul>
<li> is used to display the content of each page, nested in <frameset>; </li>
<li>The src attribute sets the path of the page to display its content</li>
<li>The name attribute can set the name of the frame for link display</li>
<li><a>The target attribute of the tag can specify the frame of the displayed page</li>
<li>When the target attribute of the<a> tag is set to "_parent", it means that its upper-level frame is displayed. When it is set to "_top", it means that the top-level frame is displayed, and the entire web page</li>
</ul>
</li>
</ul>
 <img src="file:///C:UsersAdministratorAppDataRoamingTencentUsers952433622QQWinTempRichOleWNYRJ8%24%7D7%6039%XA7F%60O%24ECY.jpg" alt=""><br><img src="http://img.blog.csdn.net/20150209002149214?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvdTAxMDg0OTU5MA==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="">
<span>Layout display</span>
​
<span><img src="http://img.blog.csdn.net/20150209002743821?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvdTAxMDg0OTU5MA==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt=""></span>
<span>Hyperlink</span>

<ul>
<li>
<span><noframes> tag, double tag</span>
<ul>
<li><span>When the browser cannot load frames, the content in the <noframes> tag will be displayed </span></li>
<li><span> is nested in the <frameset> tag and used with the <body> tag </span></li>
</ul>
</li>
<li><span><img  alt="PHP notes (HTML), php notes html_PHP tutorial" ><img src="http://img.blog.csdn.net/20150209225828597?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvdTAxMDg0OTU5MA==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="">
<p>For other properties and usage of the frame, please view the help documentation! </p>
<p> </p>
<p>Form: HTML element that can transmit input data to the server-side program </p>
<ul>
<li><form> tag, double tag
<ul>
<li> represents HTML form</li>
<li>The action attribute sets the destination of data transmission</li>
<li>The method attribute sets the transmission method, which can be set to get and post
<ul>
<li>get transmits less information and is faster. The submitted information will be displayed in the address bar, which is not safe</li>
<li>Post transfers more information and is slower. The submitted information will not be displayed in the address bar, which is safer</li>




</ul>




</li>
<li>enctype attribute sets the encoding type of data sent to the server
<ul>
<li>application/x-www-form-urlencoded: form data is encoded as name/value pairs in standard encoding format, default value</li>
<li>multipart/form-data: Form data is encoded as a piece of information. Each control on the page corresponds to a part of the information. Use </li> when uploading files.




</ul>




</li>




</ul>




</li>




</ul>
<p><img src="http://img.blog.csdn.net/20150209234024931?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvdTAxMDg0OTU5MA==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt=""></p>
<ul>
<li><input> tag, single tag
<ul>
<li>type, represents the display mode of an input field (divided into input type, selection type, click type)
<ul>
<li>text, single line text input field, input type</li>
<li>password, password input field, the entered characters are displayed as "*", input type </li>
<li>file, file upload, input type</li>
<li>checkbox, check box, selection type</li>
<li>radio, radio button, selection type</li>
<li>hidden, hidden field, generally used to pass default values, </li>
<li>Button, button, click will not submit the form, you can perform other operations, click type</li>
<li>image, image button, click will submit the form, click type</li>
<li>submit, submit button, click to submit the form, click type</li>
<li>reset, reset button, click type</li>

</ul>

</li>
<li>name, the name of the form item
<ul>
<li>Usually set to be the same as the corresponding field name in the database</li>
<li>This attribute is not required for click type</li>
<li>Identifier when transmitting data</li>
<li>The name value of the check box is generally represented by an array</li>
<li>When the name values ​​of the radio button boxes are the same, the options are mutually exclusive</li>

</ul>

</li>
<li>value, the value of the form item
<ul>
<li>Selective setting of this attribute value. After selection, it can be transmitted with the form</li>
<li>For click type except image, set this attribute, that is, set the button display name</li>
<li>Input type sets the attribute value and sets the default value</li>

</ul>

</li>
<li>maxlength, limit text input length</li>

</ul>

</li>
<li><textarea> tag, double tag
<ul>
<li>Multi-line text field, multiple lines of text can be entered</li>
<li>cols, set the number of columns, pass the number of columns, set the width</li>
<li>rows, set the number of rows, pass the number of rows, set the height</li>
<li>The rest of the attributes are consistent with the <input> tag input type</li>

</ul>

</li>
<li><select> tag, double tag
<ul>
<li>Drop-down menu</li>
<li>The name attribute sets the form item name, which is usually consistent with the database field name</li>
<li>The multiple attribute sets the form to multiple selection</li>

</ul>

</li>
<li><option> tag, double tag
<ul>
<li> Used nested in the <select> tag to represent an option in the drop-down menu </li>
<li>The value attribute sets the value of the option. After selection, it is transmitted with the form</li>
<li>The selected attribute setting is selected by default</li>

</ul>

</li>
<li><lable> tag can be set to bind text and options, so that you can select by clicking on the text </li>

</ul>
<p><img src="http://img.blog.csdn.net/20150211000412100?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvdTAxMDg0OTU5MA==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt=""></p>
<p>For other properties and usage of the form, please view the help documentation! </p>
<p><div> tag, double tag</p>
<ul>
<li>Layer tags, used to position elements or layouts</li>
<li>The content in the layer can be placed anywhere in the browser, and HTML elements can be placed </li>
<li>Often used in combination with CSS</li>
</ul>
<p>Since it is often used in conjunction with CSS, learn more when learning CSS! </p>
<p> </p>
<p><span>At this point, you have learned the basic elements of HTML and you can start making simple static web pages, but you are still far from a dynamic website! Let’s learn CSS next! </span></p>




<img src="file:///C:UsersAdministratorAppDataRoamingTencentUsers952433622QQWinTempRichOleWNYRJ8%24%7D7%6039%XA7F%60O%24ECY.jpg" alt="">
<p align="left"></p>
<div style="display:none;">
<span id="url" itemprop="url">http://www.bkjia.com/PHPjc/956929.html</span><span id="indexUrl" itemprop="indexUrl">www.bkjia.com</span><span id="isOriginal" itemprop="isOriginal">true</span><span id="isBasedOnUrl" itemprop="isBasedOnUrl">http: //www.bkjia.com/PHPjc/956929.html</span><span id="genre" itemprop="genre">TechArticle</span><span id="description" itemprop="description">PHP notes (HTML), php notes html I have learned many languages, and recently I finally decided to learn PHP. To learn PHP, you must first learn HTML, so I will start with HTML too! First learn anything...</span>
</div>
<div class="art_confoot"></div></span></li>
</ul></div><div class="nphpQianMsg"><div class="clear"></div></div><div class="nphpQianSheng"><span>Statement:</span><div>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</div></div></div><div class="nphpSytBox"><span>Previous article:<a class="dBlack" title="PHP implements getting the time of FLV file, _PHP tutorial" href="https://m.php.cn/faq/292012.html">PHP implements getting the time of FLV file, _PHP tutorial</a></span><span>Next article:<a class="dBlack" title="PHP implements getting the time of FLV file, _PHP tutorial" href="https://m.php.cn/faq/292014.html">PHP implements getting the time of FLV file, _PHP tutorial</a></span></div><div class="nphpSytBox2"><div class="nphpZbktTitle"><h2>Related articles</h2><em><a href="https://m.php.cn/article.html" class="bBlack"><i>See more</i><b></b></a></em><div class="clear"></div></div><ins class="adsbygoogle"
     style="display:block"
     data-ad-format="fluid"
     data-ad-layout-key="-6t+ed+2i-1n-4w"
     data-ad-client="ca-pub-5902227090019525"
     data-ad-slot="8966999616"></ins><script>     (adsbygoogle = window.adsbygoogle || []).push({});
</script><ul class="nphpXgwzList"><li><b></b><a href="https://m.php.cn/faq/1.html" title="How to use cURL to implement Get and Post requests in PHP" class="aBlack">How to use cURL to implement Get and Post requests in PHP</a><div class="clear"></div></li><li><b></b><a href="https://m.php.cn/faq/1.html" title="How to use cURL to implement Get and Post requests in PHP" class="aBlack">How to use cURL to implement Get and Post requests in PHP</a><div class="clear"></div></li><li><b></b><a href="https://m.php.cn/faq/1.html" title="How to use cURL to implement Get and Post requests in PHP" class="aBlack">How to use cURL to implement Get and Post requests in PHP</a><div class="clear"></div></li><li><b></b><a href="https://m.php.cn/faq/1.html" title="How to use cURL to implement Get and Post requests in PHP" class="aBlack">How to use cURL to implement Get and Post requests in PHP</a><div class="clear"></div></li><li><b></b><a href="https://m.php.cn/faq/2.html" title="All expression symbols in regular expressions (summary)" class="aBlack">All expression symbols in regular expressions (summary)</a><div class="clear"></div></li></ul></div></div><ins class="adsbygoogle"
     style="display:block"
     data-ad-format="autorelaxed"
     data-ad-client="ca-pub-5902227090019525"
     data-ad-slot="5027754603"></ins><script>     (adsbygoogle = window.adsbygoogle || []).push({});
</script><footer><div class="footer"><div class="footertop"><img src="/static/imghwm/logo.png" alt=""><p>Public welfare online PHP training,Help PHP learners grow quickly!</p></div><div class="footermid"><a href="https://m.php.cn/about/us.html">About us</a><a href="https://m.php.cn/about/disclaimer.html">Disclaimer</a><a href="https://m.php.cn/update/article_0_1.html">Sitemap</a></div><div class="footerbottom"><p>                © php.cn All rights reserved
            </p></div></div></footer><script>isLogin = 0;</script><script type="text/javascript" src="/static/layui/layui.js"></script><script type="text/javascript" src="/static/js/global.js?4.9.47"></script></div><script src="https://vdse.bdstatic.com//search-video.v1.min.js"></script><link rel='stylesheet' id='_main-css' href='/static/css/viewer.min.css' type='text/css' media='all'/><script type='text/javascript' src='/static/js/viewer.min.js?1'></script><script type='text/javascript' src='/static/js/jquery-viewer.min.js'></script><script>jQuery.fn.wait = function (func, times, interval) {
    var _times = times || -1, //100次
    _interval = interval || 20, //20毫秒每次
    _self = this,
    _selector = this.selector, //选择器
    _iIntervalID; //定时器id
    if( this.length ){ //如果已经获取到了,就直接执行函数
        func && func.call(this);
    } else {
        _iIntervalID = setInterval(function() {
            if(!_times) { //是0就退出
                clearInterval(_iIntervalID);
            }
            _times <= 0 || _times--; //如果是正数就 --

            _self = $(_selector); //再次选择
            if( _self.length ) { //判断是否取到
                func && func.call(_self);
                clearInterval(_iIntervalID);
            }
        }, _interval);
    }
    return this;
}
$("table.syntaxhighlighter").wait(function() {
    $('table.syntaxhighlighter').append("<p class='cnblogs_code_footer'><span class='cnblogs_code_footer_icon'></span></p>");
});
$(document).on("click", ".cnblogs_code_footer",function(){
      $(this).parents('table.syntaxhighlighter').css('display','inline-table');$(this).hide();
});
$('.nphpQianCont').viewer({navbar:true,title:false,toolbar:false,movable:false,viewed:function(){$('img').click(function(){$('.viewer-close').trigger('click');});}});
</script></body><!-- Matomo --><script>  var _paq = window._paq = window._paq || [];
  /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
  _paq.push(['trackPageView']);
  _paq.push(['enableLinkTracking']);
  (function() {
    var u="https://tongji.php.cn/";
    _paq.push(['setTrackerUrl', u+'matomo.php']);
    _paq.push(['setSiteId', '9']);
    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
    g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
  })();
</script><!-- End Matomo Code --></html>