HEAD element uses highlights

xiaoxiao2021-03-06  37

The HTML document consists of two parts: HEAD (the subject section, generally invisible) and body (the body part, visible in the browser). With the popularity of FrontPage and Dreamweaver (DW), etc., you don't understand HTML, you can also make a professional page is no longer a dream. However, these homepage production tools cannot generate a good topic section, this requires us to understand the elements of it.

First, Head element

Meta records information of the current page, such as character encoding, author, copyright, keyword, etc. It can also be used to provide information to the server, such as deadline, and page refresh intervals. Its basic usage is: telling the browser web page identified file type and language type; let search engine searches your page by keyword.

Attribute specifies if the META tag contains Name (page description information) or HTTP Equiv (HTTP title information). "Value" specifies the type of information provided. Some values ​​are already defined, there are specialty attribute inspections in DW. For example, Description, Keyword (keyword), refresh, etc. You can also specify any other value, such as CreationDate, Document ID, and Level (level).

CONTENT. If the level is specified for value (value), Content may be Beginner, Intermediate, Advanced.

Title page title, displayed on the browser's title bar.

Keywords Many popular search engines automatically read keywords content in the Meta tab and use this information to establish an index of the page in its database. Some search engines have a number of restrictions on keywords or characters when establishing an index. Some, ignore all keywords when the keyword is exceeded. Therefore, it is necessary to select the keyword for the webpage. Use a comma to separate the keywords in the domain of the mark keywords.

Description has a similar function with Keywords. Just use the descriptive statement instead of the keyword. Some search engines have certain restrictions on the number of characters when establishing an index, so it should be simply simple.

Refresh uses the refresh element to specify automatically refresh the page after a certain period of time.

Action Specifies whether to go to other URLs or refresh the current page. To go to other URLs, click the Brower button to select the page you want to load.

DELAY is a wait time in seconds before refreshing the page. To refresh the page immediately, you can enter 0 in this domain.

Base uses the base element to set the basic URL.

HREF Specifies the basic URL to type the path or selection directly.

Target Specifies the window to open for all links. You can select a framework in the current frameset or select one of the four reserved windows it provides, default is _self.

LINK uses the link element to define the relationship between the current document and other files (such as CSS files).

ID specifies the unique identifier of a link.

Title Description Links. This property is very suitable for link style sheets.

REL specifies the relationship between the document in the current document and the HREF domain. Its possible values ​​include: Alternate, Stylesheet, Start, Next), Prev (Previous), Content (Content), Index (Index), Glossary (vocabulary), Copyright (copyright), Chapter, Section, Subsection, Appendix, Help (Help Information), Bookmark (Bookmark), etc. To specify multiple relationships, use spaces to separate the values.

Second, the example

Head element uses highlight </ title></p> <p><! - Web Title -></p> <p><meta http-equiv = "content-type" content = "text / html; charSet = GB2312"></p> <p><! - Web content type, TXT or HTML format, encoding method is GB2312 -></p> <p><meta name = "keywords" content = "head elements"></p> <p><! - Keyword Information -></p> <p><meta name = "description" content = "This page is used to illustrate the use of the HEAD element"></p> <p><! - Further Description of the Website -></p> <p><meta http-equiv = "refresh" Content = "5; url = index.htm"></p> <p><! - Webpage automatically refreshed after 5 seconds, link address is index.htm page -></p> <p><base href = "" Target = "_ blank"></p> <p><! - Basic link setting, the target is a new page. This item can be used to specify a link displayed in the frame page, for example: target = "main"></p> <p><link rel = "stylesheet" href = "homepage.css"></p> <p><! - Turn into the style sheet, link style sheet file "homepage.css" -></p></div><div class="text-center mt-3 text-grey"> 转载请注明原文地址:https://www.9cbs.com/read-57534.html</div><div class="plugin d-flex justify-content-center mt-3"></div><hr><div class="row"><div class="col-lg-12 text-muted mt-2"><i class="icon-tags mr-2"></i><span class="badge border border-secondary mr-2"><h2 class="h6 mb-0 small"><a class="text-secondary" href="tag-2.html">9cbs</a></h2></span></div></div></div></div><div class="card card-postlist border-white shadow"><div class="card-body"><div class="card-title"><div class="d-flex justify-content-between"><div><b>New Post</b>(<span class="posts">0</span>) </div><div></div></div></div><ul class="postlist list-unstyled"> </ul></div></div><div class="d-none threadlist"><input type="checkbox" name="modtid" value="57534" checked /></div></div></div></div></div><footer class="text-muted small bg-dark py-4 mt-3" id="footer"><div class="container"><div class="row"><div class="col">CopyRight © 2020 All Rights Reserved </div><div class="col text-right">Processed: <b>0.046</b>, SQL: <b>9</b></div></div></div></footer><script src="./lang/en-us/lang.js?2.2.0"></script><script src="view/js/jquery.min.js?2.2.0"></script><script src="view/js/popper.min.js?2.2.0"></script><script src="view/js/bootstrap.min.js?2.2.0"></script><script src="view/js/xiuno.js?2.2.0"></script><script src="view/js/bootstrap-plugin.js?2.2.0"></script><script src="view/js/async.min.js?2.2.0"></script><script src="view/js/form.js?2.2.0"></script><script> var debug = DEBUG = 0; var url_rewrite_on = 1; var url_path = './'; var forumarr = {"1":"Tech"}; var fid = 1; var uid = 0; var gid = 0; xn.options.water_image_url = 'view/img/water-small.png'; </script><script src="view/js/wellcms.js?2.2.0"></script><a class="scroll-to-top rounded" href="javascript:void(0);"><i class="icon-angle-up"></i></a><a class="scroll-to-bottom rounded" href="javascript:void(0);" style="display: inline;"><i class="icon-angle-down"></i></a></body></html><script> var forum_url = 'list-1.html'; var safe_token = 'E6uWMLgVwlG1ajT3KRoNWwxAL2SVMMuoCZ98peCN2cSGT0V_2B3dXo5U3ZWYIGCimyCyb4lJsWY1lr_2FK6BF5pGdA_3D_3D'; var body = $('body'); body.on('submit', '#form', function() { var jthis = $(this); var jsubmit = jthis.find('#submit'); jthis.reset(); jsubmit.button('loading'); var postdata = jthis.serializeObject(); $.xpost(jthis.attr('action'), postdata, function(code, message) { if(code == 0) { location.reload(); } else { $.alert(message); jsubmit.button('reset'); } }); return false; }); function resize_image() { var jmessagelist = $('div.message'); var first_width = jmessagelist.width(); jmessagelist.each(function() { var jdiv = $(this); var maxwidth = jdiv.attr('isfirst') ? first_width : jdiv.width(); var jmessage_width = Math.min(jdiv.width(), maxwidth); jdiv.find('img, embed, iframe, video').each(function() { var jimg = $(this); var img_width = this.org_width; var img_height = this.org_height; if(!img_width) { var img_width = jimg.attr('width'); var img_height = jimg.attr('height'); this.org_width = img_width; this.org_height = img_height; } if(img_width > jmessage_width) { if(this.tagName == 'IMG') { jimg.width(jmessage_width); jimg.css('height', 'auto'); jimg.css('cursor', 'pointer'); jimg.on('click', function() { }); } else { jimg.width(jmessage_width); var height = (img_height / img_width) * jimg.width(); jimg.height(height); } } }); }); } function resize_table() { $('div.message').each(function() { var jdiv = $(this); jdiv.find('table').addClass('table').wrap('<div class="table-responsive"></div>'); }); } $(function() { resize_image(); resize_table(); $(window).on('resize', resize_image); }); var jmessage = $('#message'); jmessage.on('focus', function() {if(jmessage.t) { clearTimeout(jmessage.t); jmessage.t = null; } jmessage.css('height', '6rem'); }); jmessage.on('blur', function() {jmessage.t = setTimeout(function() { jmessage.css('height', '2.5rem');}, 1000); }); $('#nav li[data-active="fid-1"]').addClass('active'); </script>