Home  >  Article  >  Web Front-end  >  Summary of Html knowledge

Summary of Html knowledge

怪我咯
怪我咯Original
2017-01-16 11:51:021709browse

1. Jump out of the new page:

target="_self" does not jump

Jump setting for form form submission

2. Click the button to jump to other pages and add

onclick="return false"

3. display:block;Block-level element, that is to say, it can set some width and height and occupy an exclusive line, such as div element, p elements and other display:inline-block, row-level elements, that is to say, it can make elements that are also set as row-level elements together in one line, and then you can set the width and height. This is suitable for making a navigation menu and setting each menu item Row-level elements. Its width and height default to the width and height of the content, and a typical element is a form class element. dispaly: inline. For row-level elements, the width and height cannot be set. The default width and height are the width and height of the content. Typical examples include span,

4, html mouse hand:

cursor: pointer;

5. HTML background image attributes:

background-size:100%;, but the width and height of your image should be set to 100%. Pay attention to the .php file The background-image:url(); inside is not easy to use and invalid. You have to use the absolute path of the website background:url('/20151106/404/image/404.png') no-repeat 4px 5px;}background:url ("11111.jpg");background-repeat:no-repeat;background-size:100%;width:100%;height:100%;

This is the body that adds a background to the page{padding: 0px;margin: 0px;background-color:#494949;width:100%;height:100%;}.

You can also use background-image:url("" when setting the background image ; ;q>double quote tag underline

7. html---position/relative/absolute/fixed/The summary of the three layout positioning methods relative is According to itself, absolute is based on the browser, but it should be noted that if it has a parent element, then it changes its position according to the parent element.

8. Remove the black dots in front of the unordered list li{list-style:none;}

9. Hidden elements - display:none or visibility:hidden

display- After this element is set, the original element will not occupy the current space and will not affect the layout. However, the latter element will still occupy space after being hidden.

10. HTML hidden redundant

Div{overflow :hidden}

10. Hide adaptive: overflow:auto;

11. Questions about the frame

This is to accept the page you want to display

indx.php is the page displayed by the frame, the top one, that is, it is displayed without buttons

This is where you want to display it after clicking: target=""

Add category

12. Regarding the height of the background, that is to say, you defined a div but didn't do it. Get your picture on top. Then there is this attribute

overflow:hidden;

That is, you belong to the parent element, but your float is separated from the text and becomes floating, so everything will not We are using the space of parent-child elements, so add this overflow:hidden;

13. Anchor setting

Add the following to the page you want to jump to: < a name="miao">

Then addFind the anchor point

where you want to add the link 14. Click to change the verification code image

15、Rounded corners

border-radius:5px;

16. The text on the left side of the textarea is on the far left

style="vertical-align:top"


17. HTML block elements and inline elements To summarize, block elements can set margin, but when using margin, they must comply with: 1. Block elements, 2. Have width and height. Inline elements cannot set the margin and width and height attributes, and can only set padding

Block element list:

Definition address

Definition table title

Definition in the list Entries

Defines a section or section in a document

Defines a list

Defines an item in a list

Define a frameset

Create an HTML form

Define the largest title

Define subtitle

Define the title

Define the title

Define the title

Define the smallest title


Create a horizontal line

Element defines title for

element

  • Label defines list item

    Display text for browsers that do not support frames, inside the frameset element<br><br><noscript>Define alternative content when the script is not executed<br><br><ol>Define ordered list<br><br><ul>Define unordered list<br><br><p>Tag definition paragraph<br><br><pre class="brush:php;toolbar:false">Define preformatting The text<br><br><table> tag defines the HTML table<br><br><tbody>tag table body (body)<br><br><td>Standard cells in the table<br><br><tfoot>Define the footer of the table (footnote or table note)<br><br><th>Define the header cell<br><br><thead>The label defines the header of the table <br><br><tr>Define rows in the table</p> <h2>List of inline elements</h2> <p><a>Tag can define anchors<br><br><abbr>Representation An abbreviation form<br><br><acronym>defines only the acronym<br><br><b>Bold font<br><br><bdo>can override the default text direction<br><br><big>Large font bold<br><br><br>Line break<br><br><cite>Quote for definition<br><br><code>Definition of computer code Text<br><br><dfn>Define a definition item<br><br><em>Defined as emphasized content<br><br><i>Italic text effect<br><br>&lt ;img>Embed an image into a web page<br><br><input>Input box<br><br><kbd>Define keyboard text<br><br><label>The label is<br> <br><input> Element definition annotation (tag)<br><br><q>Define short quote<br><br><samp>Define sample text<br><br><select> Create a single or multi-select menu<br><br><small>Render a small font effect<br><br><span>Combine inline elements in the document<br><br><strong>More tone Strongly emphasized content<br><br><sub>Define subscript text<br><br><sup>Define superscript text<br><br><textarea>Multi-line text input control<br><br><tt>Typewriter or fixed-width text effect<br><br><var>Define variables<br></p></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="Detailed explanation of HTMLParser usage (3)" href="http://m.php.cn/faq/347360.html">Detailed explanation of HTMLParser usage (3)</a></span><span>Next article:<a class="dBlack" title="Detailed explanation of HTMLParser usage (3)" href="http://m.php.cn/faq/348804.html">Detailed explanation of HTMLParser usage (3)</a></span></div><div class="nphpSytBox2"><div class="nphpZbktTitle"><h2>Related articles</h2><em><a href="http://m.php.cn/article.html" class="bBlack"><i>See more</i><b></b></a></em><div class="clear"></div></div><ul class="nphpXgwzList"><li><b></b><a href="http://m.php.cn/faq/348757.html" title="Summary of Html knowledge" class="aBlack">Summary of Html knowledge</a><div class="clear"></div></li><li><b></b><a href="http://m.php.cn/faq/348804.html" title="How to learn HTML quickly" class="aBlack">How to learn HTML quickly</a><div class="clear"></div></li><li><b></b><a href="http://m.php.cn/faq/348873.html" title="The difference between html xhtml xml" class="aBlack">The difference between html xhtml xml</a><div class="clear"></div></li><li><b></b><a href="http://m.php.cn/faq/348884.html" title="The difference between src and href attributes" class="aBlack">The difference between src and href attributes</a><div class="clear"></div></li><li><b></b><a href="http://m.php.cn/faq/348902.html" title="About HTML5 and CSS replacement use" class="aBlack">About HTML5 and CSS replacement use</a><div class="clear"></div></li></ul></div></div><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="http://m.php.cn/about/us.html">About us</a><a href="http://m.php.cn/about/disclaimer.html">Disclaimer</a><a href="http://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></html>