Article Introduction:About HTML5 believe that everyone has been familiar with, but his real meaning in the specific development will have what role? With respect to HTML, what new definition and new ideas does he have in it? Why do some experts think that when HTML5 is completely complete, all the work can be achieved in a true cloud way? Do you have any idea about this series of questions? This series of articles will answer all the things you don't know about HTML5 and HTML, including: HTML5 's new ideas and ideas, the purpose of HTML5 's new tags and the application of specific development scenarios, HTML5 and CSS3 's emotional experience (collocation), Includes some small privacy of HTML5 's father html (things you may not know in development);
Hello , everyone, and see you again,
What can I tell you about today that you may not know about? Now let's see.
1) What is the importance of the element title attribute to semantics?
2) What are the new tags in HTML5 that have important implications for writing text?
3) Correct usage and precautions of <address>, <figure>, <time> tags in HTML5 what do you not know?
4) About <em><strong> and <b><i> 's past life?
The first one.
What is the importance of the element title attribute to semantics?
Title property does this just look at the title tag? But don't get together, they are completely different things; we seldom use this property in our development, first of all it is what it is, in fact, he is a prompt effect of the property; For screen readers, you can read text to the user , so the correct use can improve the accessibility of the page, such as the effect and code in the browser, the implementation of the code to show your friends have not found this has déjà vu feeling, is the previous use of tags, the alt attribute of the feeling, this is the need to pay attention to friends, In IE7, the IMG tag used ALT to display the text, but after the IE7 version, if the ALT and title two properties appear at the same time will display the title property in the text instead of the ALT attribute, if the result of the run:
a second question
What are the new tags in HTML5 that have important implications for writing text?
I would like to say a few words before writing the answer to the question of the understanding and use of these tags (at least the small part is so understanding and self-feeling effect can be); 1, clear HTML5 's core idea is the meaning, so no matter what the label is to look at the expression, rather than see the effect of the show; 2, about the text of the relevant label can be properly imagined as a punctuation in the language so that it is convenient to remember and use (or you can also through other means) well understand the above two points we are speaking of these new tags of the semantics and use it; <address>, <figure& GT, <time> These three tags the next question in detail said here is not to say; <strong><em> This two tag is already in the HTML4.0, but here's a little bit of it because it might have been rarely used before because very few people pay attention to semantics; <strong> represents important text (default is bold)-- The emphasis is on the semantic expression rather than the effect of the presentation. This needs to be remembered. <em> represents the underlined text (the default is italic)
<mark>The new element in the tag HTML5 is used to highlight the text, and its effect is like marking with a highlighter to the focus of the statement; <span> tag This is also in the HTML has already had, the previous article also probably mentioned once but did not have the detailed explanation, below detailed explanation: 1.span does not have any semantics, so the correct way to use it is to be used when there is no other appropriate label to use it; 2. It is a phrase-level label so it does not appear on a new line, 3. As in a div, you can add a span tag using a micro-format to increase the semantics; 4. In general, it is necessary to use CSS to control its display style because it has no style of presentation;
<wbr>A new label that looks like <br>, except that it doesn't force a newline;
<ruby><rp><rt>These labels are like the phonetic transcription in Chinese;
<meter>It can be used to do some measurement results display and voting results display (now the problem is that the browser does not support it)
<progress>The same progress bar display, can be used for some good interaction with the user effect; The problem is that browser compatibility is not good now;
a third question
The correct usage and precautions of <address>, <figure>, <time> tags in HTML5 what do you not know?
<address>This tag is new so with his people very little as to the correct usage of course also few people to study it; a simple summary: 1.address is used to define contact information for authors, related people, or organizations associated with an HTML page or part of a page, usually at the bottom of the page or in a related section; 2. Most of the time, the contact information is the author's e-mail or link to the contact information page; This is correct, cannot mark "contact Us" in the office location This is the wrong usage; 3. The information provided is accurate, not the correctness of the address of the email, but the person who needs to provide the information, If a page has a lot of relevant people, then provide information must determine the accuracy of information, do not pigtailed; 4.address tags cannot have h1~h6\article\address\aside\footer\header\hgroup\nav\ section and other labels;
<figure>This element is used to introduce charts, graphs, photographs, etc., the corresponding scene is like a magazine picture, before the HTML5 is not a special label to do this, before the implementation of this function is to use the non-semantic div tag; Usage tip: 1.figure elements can contain multiple content blocks ; But there can only be one figcaption (which can be interpreted as a caption to a chart) label 2. You can use H1~h6 to add headings to figures; 3.figcaption cannot appear alone, need to have a matching content to appear together;
<time>This tag can be used to mark a specific time or date; The application scenario is usually the time of the publication of an article, such as: it is important to note that the time in 1.datetime is the same as the date of the text element in the timestamp, and the notation can be different; 2. If this time is to represent the entire article or the time of the page need to add the pubdate attribute; 3. Do not use the time tag for an exact period such as "Noon Today", "last weekend" 4. If you use the Pubdate property, be aware that you want to avoid pigtailed problems under the same parent tag The 5.times tag cannot be nested in another time label; 6.datatime has a standard machine time format that is required to be a typical computer. The YYYY-MM-DDTHH:MM:SS is actually a new label, and there's a lot more to it, and here's just some of the basics. , but I think it's an introduction to the time element with what's said above.
Question Fourth
about <em><strong> and <b><i> 's past life? All of you who have developed HTML know that <em> and <i>, <strong> and <b> their presentation form, one is italic one is bold, then how do they get along in HTML5? Let's focus on the <b><i> 's previous life: In the early days, the internet did not have a thing called CSS at that time, in order to distinguish between the focus of the text and the special meaning of the text <b><i> the brothers appeared; With their help, the text of the page and the user's interaction has been improved. However, in the case of the rapid development of the Internet, soon appeared a CSS, its responsibility is to control the form of the page, of course, including the form of <b><i>, So in html4.0 and XHTML1, there are developers suggest abandoned <b><i>, and take the face of the <strong><em>+css, because they have the semantics to better interact with the user But the problem did not end there, because in some cases in the development of the discovery of <strong><em> is always not a good expression of semantics, to this end, in the HTML5 <b><i> has a modified appearance to show us, So in the HTML5 and re-enabled the <b><i> brothers, then specifically in HTML5 when to use it? The B-tag means a piece of text that reminds the reader of the purpose for practical purposes, does not convey any additional importance, and does not mean other meanings and tones, such as keywords, product names, operation instructions, etc.; I tag denotes a piece of text different from other words, with different voice or tone, used for: classification name, technical terminology, Idiomatic words in a foreign language, etc.;
OK, let's talk about it today, do you have any help in reading this article? Believe that through these articles feel you to HTML5 text label this piece understand a lot?
Next article I will talk about some HTML5 and image related things oh, I believe there will be some things you do not know.
Thank you for your reading and look forward to seeing you next time.
As an IT technician to hone their own technology is essential, concern number Coder_online, the programmer Interactive Alliance, or scan the QR code below, you can chat with Daniel online at any time to discuss their interests, so that they learn the most at least the most things, I am looking forward to your joining in the Programmer Interaction Alliance
What you don't know about HTML5 and the things in the HTML (iv)--text label