Home  >  Article  >  Web Front-end  >  HTML Essay_html/css_WEB-ITnose

HTML Essay_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:40:13974browse

1. HTML tags

Tags are the most basic unit and the most important component in html.

usually requires two angle brackets Bracketed: "<" and ">".

Tags are closed (two forms: paired and unpaired)

Tags are size Write irrelevant, and have the same meaning. The standard recommends using lowercase letters, which conforms to the XHTML standard.

 

The following is a simple html example production :

 

2. The main structure of HTML

consists of three parts: DTD header, header , Main part.

 

3.HTML document head element

 

4.HTML document theme tags

4.1 Format tags

The following is an example of format tags:



Format tag test Web page


                                                                                                                                                 🎜> Left side

Right side
lt;ul>
         

  • The first item

  •                            < ;hr />
    Ordered list:

      🎜> 
    1. The third item







    The running effect is:


     


    5. Establish anchor points and hyperlinks


    a tag--represents HTML link
    a, is the first letter of anchor, and a tags appear in pairs, namely ....
    Common attributes:

    href -- represents a url link source (that is, where to link to)

    In addition to web pages, urls can also be other files (such as text files, pdf files, etc.). url can also point to a location in an HTML file. The url can also be an email address.

    target -- used to indicate which window or frame should be opened by this link

    target=_blank: Open the link content in a new browsing window.

    target=_parent: Treat the linked content as the previous screen of the file.

    target=_self: Display the linked content in the current window. target=_top: This parameter can solve the problem of new content being surrounded by old frames and windows. Using this parameter, the entire screen will be redisplayed as linked screen content. title -- represents additional prompt information for the link


    Link syntax:





    Hyperlink example:



     
    Click the displayed text link to the Baidu page



    6. Commonly used tags in tables

    Common attributes of table tags:

    table tag attributes:
    width -- represents the width of the table
    height -- represents the height of the table
    border -- represents the table border (this attribute should be implemented using CSS)
    cellspacing -- Represents the distance between the table border and the table content padding, and also the distance between the content padding (this attribute should be implemented using CSS)
    cellpadding -- represents the width of the content padding (this attribute should be implemented using CSS)
    th, td Label attributes:
    width and height ? Represents width and height
    colspan -- One row spans multiple columns
    rowspan -- One column spans multiple rows
    align -- Represents horizontal alignment (left (left-aligned) | center (center alignment) | right (right alignment) | justify) (This attribute should be implemented using CSS)
    valign -- represents vertical alignment (top (top alignment) | middle (middle alignment) | bottom (bottom alignment) ) | baseline (baseline alignment)) (This attribute should be implemented using CSS)


    Comprehensive example:

    7.HTML frame tag

    tag -- instead of the body tag, the frame page is defined and the frame is defined How many rows and columns will it be divided into. Commonly used attributes are as follows:
    cols -- defines how many columns and column sizes the frame contains (each value is separated by commas), the value is pixel px or percentage %
    rows -- defines how many rows the frame contains and the size of the row (each value is separated by a comma), the value is pixel px or percentage %
    border -- Define the border of the frame page defined by the frame (unit pixel), use css to implement
    frameborder -- Define whether the frame page has a border (this attribute should be written inside the frame tag and should not appear here)
    framespacing - Define the distance between frame pages, use css to implement the
    tag <br> Text can be displayed for browsers that do not support frames. Use the <br><iframe> tag <br> in combination with <body> to create an inline frame that contains another document. The content within the iframe tag can be viewed as Displayed when the browser does not support iframe tags. <br><br></p> <p>frame tag--define the content of each frame page in the frameset tag <br>The frame tag appears alone, <frame /> <br>Common attributes: <br>frameborder -- defines the border of the content page, the value is (1|0), the default value is 1 <br>1 -- displays the border between each page <br>0 -- does not display the border<br>name -- used when one frame page links to another frame page (another frame page can use target to define the link page) <br>noresize -- defines whether the viewer can change the size of the frame page by dragging, take The value is (noresize) <br>scrolling -- Define whether there is a scroll bar, the value is (yes|no|auto), the default value is auto <br>yes -- Display the scroll bar <br>no -- Do not display it Scroll bar <br>auto -- Display the scroll bar when needed <br>src -- Define the content page URL <br>border ? Set the border thickness <br><br></p> <p><strong> frame Example:</strong></p> <p><html> /head> > "200, *"> >                                                                                    ​          <!-- Content form on the right-- ><br>                                                              < ;</body><br>                                                                         These are all important contents to learn in HTML, so remember them firmly. <br> <br> <br> <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="Why is there no response when clicking the a tag in html? _html/css_WEB-ITnose" href="http://m.php.cn/faq/272961.html">Why is there no response when clicking the a tag in html? _html/css_WEB-ITnose</a></span><span>Next article:<a class="dBlack" title="Why is there no response when clicking the a tag in html? _html/css_WEB-ITnose" href="http://m.php.cn/faq/272963.html">Why is there no response when clicking the a tag in html? _html/css_WEB-ITnose</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>