. Net, have you forgotten? (4) -- Review non-mainstream HTML tags

Source: Internet
Author: User

In ASP. NET, we usually use server-side controls: <asp:>. At the same time, we ignore the use of many HTML elements.

In this chapter, let's simply review the standards of Some HTML elements.

1. <q> and <BLOCKQUOTE>

For these two elements, I think many people who often use. NET Server-side controls, Visual Studio, DW and other visual tools should have forgotten about them. Here, we will make a simple review.

First, we recall two concepts: inline elements and block elements in HTML. Here I will explain my understanding:

Block elements are commonly used for other elements. Their most typical sign is to separate the content of the elements they enclose from other block elements.

Inline elements are semantic-based elements. That is to say, inline elements often act on segments to make a special semantic mark for a sentence or element.

Well, the concept has been clarified. Let's take a look at <q> and <BLOCKQUOTE>. They both represent references. Difference: The above concepts are used to explain: <q> is an inline element, while <BLOCKQUOTE> is a block element.

For example:

First, let's look at an example using <BLOCKQUOTE>:

Li Bai once wrote such a poem:
<BLOCKQUOTE>
Moonlight in front of bed,
It may be ground cream.
Looking at the moon,
Bow down to my hometown.
</BLOCKQUOTE>

Next, let's take a look at the usage of <q>:

 
Confucius once said:<Q>Three pedestrians, we must have our teacher</Q>

Through the two examples, we can see the difference between the two, that is, <BLOCKQUOTE> is often used as a reference of long segments and whole segments. <Q> small references are more commonly used.

2. About the list

Can you tell me more about the list?

Do not tell me <asp: bulletedlist>. I am talking about HTML elements.

Maybe you will tell me <ul>, <ol>. Are there only these two types? Nononono!

In HTML elements, there are actually three types of list: ul (unordered list), Ol (orderedlist), and DL (definition list ).

This is simple. Just write two lines.CodeAfter that:

Select your favorite number:
< Ol >
< Li > 1 </ Li >
< Li > 2 </ Li >
< Li > 3 </ Li >
< Li > 4 </ Li >
</ Ol >

I like the following:
< Ul >
< Li > Dad </ Li >
< Li > Mom </ Li >
< Li > Grandpa </ Li >
< Li > Grandma </ Li >
</ Ul >
The following are some definitions:
< DL >
< DT > Person </ DT >
< Dd > A person is a senior animal.</ Dd >
< DT > Animals </ DT >
< Dd > Animals are a low-level person. </ Dd >
</ DL >

In fact, we can replace these elements and express them in other forms. However, we recommend that you use the HTML element closest to your expression to express your meaning!

3. About <em>

A few years later, do you still remember this non-mainstream element?

Let's go to w3cschool to see:

<Em>: The highlighted text.

Here, I don't want to talk about the usage of this element. This is just used to bring out the topic.

About the browser adaptation of your code.

We know that although W3C is committed to browser standards, it still has little effect. IE, Firefox, and other browsers all have their own standards and forms.

So, how can we make our code better adapt to the standards of each browser?

For example, <em>. I did not perform tests because I only installed IE on my computer. Here is just an example. It is very likely that such a situation occurs. In ie, the emphasis is to bold the font, while in Firefox, the emphasis is to tilt the font. My personal opinion is to let the browser parse our willingness to express ourselves, rather than forcing us to add expressions to the browser.

Why? I will insert some digress here. During the interview, I often encounter some inexplicable questions, such as two things that I think are basically the same. The interviewer will ask me: Which one will you use if you choose? I often give the answer that I think the two are similar, but if I have to make a choice, I choose a because a is supported by their own vendor, I think a company will certainly provide the greatest support and Optimization for its own concepts.

Of course, my answer is actually nonsense and opportunistic, but I think it is always the best to let a product follow its own standards. Just like the ancient governance of inaction, it is the best way to govern the country!

In addition, Lao Zhao said: semantics and style should be written separately. This reminds me that another reason for doing so is maintainability. Your follow-upProgramStaff or when your website needs to change the style, using more matching tags can make your code more flexible!

All I can think of now is the details and standards of HTML.

There are some basic problems here. I am on the homepage to remind everyone who has been living on the top. Don't forget these basic concepts and knowledge.

Then, at the end, I hope you can help me think about html details and standards. Let's recall these non-mainstream labels that we have forgotten.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.