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

Summary of Html knowledge

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

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><div class="nphpFoot"><div class="nphpFootBg"><ul class="nphpFootMenu"><li><a href="http://m.php.cn/"><b class="icon1"></b><p>Home</p></a></li><li><a href="http://m.php.cn/course.html"><b class="icon2"></b><p>Course</p></a></li><li><a href="http://m.php.cn/wenda.html"><b class="icon4"></b><p>Q&A</p></a></li><li><a href="http://m.php.cn/login"><b class="icon5"></b><p>My</p></a></li><div class="clear"></div></ul></div></div><div class="nphpYouBox" style="display: none;"><div class="nphpYouBg"><div class="nphpYouTitle"><span onclick="$('.nphpYouBox').hide()"></span><a href="http://m.php.cn/"></a><div class="clear"></div></div><ul class="nphpYouList"><li><a href="http://m.php.cn/"><b class="icon1"></b><span>Home</span><div class="clear"></div></a></li><li><a href="http://m.php.cn/course.html"><b class="icon2"></b><span>Course</span><div class="clear"></div></a></li><li><a href="http://m.php.cn/article.html"><b class="icon3"></b><span>Article</span><div class="clear"></div></a></li><li><a href="http://m.php.cn/wenda.html"><b class="icon4"></b><span>Q&A</span><div class="clear"></div></a></li><li><a href="http://m.php.cn/dic.html"><b class="icon6"></b><span>Dictionary</span><div class="clear"></div></a></li><li><a href="http://m.php.cn/course/type/99.html"><b class="icon7"></b><span>Manual</span><div class="clear"></div></a></li><li><a href="http://m.php.cn/xiazai/"><b class="icon8"></b><span>Download</span><div class="clear"></div></a></li><li><a href="http://m.php.cn/faq/zt" title="Topic"><b class="icon12"></b><span>Topic</span><div class="clear"></div></a></li><div class="clear"></div></ul></div></div><div class="nphpDing" style="display: none;"><div class="nphpDinglogo"><a href="http://m.php.cn/"></a></div><div class="nphpNavIn1"><div class="swiper-container nphpNavSwiper1"><div class="swiper-wrapper"><div class="swiper-slide"><a href="http://m.php.cn/" >Home</a></div><div class="swiper-slide"><a href="http://m.php.cn/article.html" class="hover">Article</a></div><div class="swiper-slide"><a href="http://m.php.cn/wenda.html" >Q&A</a></div><div class="swiper-slide"><a href="http://m.php.cn/course.html" >Course</a></div><div class="swiper-slide"><a href="http://m.php.cn/faq/zt" >Topic</a></div><div class="swiper-slide"><a href="http://m.php.cn/xiazai" >Download</a></div><div class="swiper-slide"><a href="http://m.php.cn/game" >Game</a></div><div class="swiper-slide"><a href="http://m.php.cn/dic.html" >Dictionary</a></div><div class="clear"></div></div></div><div class="langadivs" ><a href="javascript:;" class="bg4 bglanguage"></a><div class="langadiv" ><a onclick="javascript:setlang('zh-cn');" class="language course-right-orders chooselan " href="javascript:;"><span>简体中文</span><span>(ZH-CN)</span></a><a onclick="javascript:;" class="language course-right-orders chooselan chooselanguage" href="javascript:;"><span>English</span><span>(EN)</span></a><a onclick="javascript:setlang('zh-tw');" class="language course-right-orders chooselan " href="javascript:;"><span>繁体中文</span><span>(ZH-TW)</span></a><a onclick="javascript:setlang('ja');" class="language course-right-orders chooselan " href="javascript:;"><span>日本語</span><span>(JA)</span></a><a onclick="javascript:setlang('ko');" class="language course-right-orders chooselan " href="javascript:;"><span>한국어</span><span>(KO)</span></a><a onclick="javascript:setlang('ms');" class="language course-right-orders chooselan " href="javascript:;"><span>Melayu</span><span>(MS)</span></a><a onclick="javascript:setlang('fr');" class="language course-right-orders chooselan " href="javascript:;"><span>Français</span><span>(FR)</span></a><a onclick="javascript:setlang('de');" class="language course-right-orders chooselan " href="javascript:;"><span>Deutsch</span><span>(DE)</span></a></div></div><script> var swiper = new Swiper('.nphpNavSwiper1', { slidesPerView : 'auto', observer: true,//修改swiper自己或子元素时,自动初始化swiper observeParents: true,//修改swiper的父元素时,自动初始化swiper }); </script></div></div><!--顶部导航 end--><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>