What about html and CSS-1 tag attributes and elements

Source: Internet
Author: User

It has been engaged in. Net background development for a long time, interspersed with foreground development. At present, the development skills constitute about 35% frontend and 65% background. Gradually I found myself more interested in front-end web development (not catching a cold with the business logic of pulling East and West in the background ..., In addition, the previous background development has been suppressing my creativity) and decided to start systematically learning the skills required for front-end development, including HTML, CSS, JavaScript, Silverlight, and Flash, of course there are PS... As for. NET development, Levin will continue to maintain its own open-source projects. A few years later, Levin said, "Brother was a killer ".

Note: This blog series contains e-book Reading Notes. Suitable for html4 and XHTML, and the basic is often gray.

Books being read:

HTML and CSS standard {done}

Addison. Wesley. Spring. Into. html. And. CSS. apr.2005 {ing}

 

1. The first line starts with <! Doctype... started to let the browser know what you are going to do, otherwise the browser will use the "quirks" (strange) mode to show your webpage

2. Closing tags is a good habit. Even make sure to close the tag

3. the browser will not follow youCodeNo space is concerned about how it is written.

After reading w3schools.com, the browser usually truncates spaces. For example, if you press 10 consecutive spaces, the browser may only keep one space for you. In this case, use the space "character entity name", that is, "& nbsp. For HTML entities, see http://www.w3schools.com/HTML/html_entities.asp

4. Emphasize

Bold emphasizes strong, italics emphasizes em; do not use outdated B and I because they are not semantic tags.

5. line feed

<Br/> never use "line breaks as segments. Use P for segmentation. Remember: use tags Based on semantics.

6. Title

HTML document title <title/>

Title of HTML content H1 ~ H6. The primary heading is H1. It is recommended that one page be displayed only once. H2 ~ H3 is used in sequence based on the design intent.

Other materials: use of titles and Seo

7. List

Unordered ul ordered ol, definition list DL

 

8. Link

<A>. Note the application scenarios of "open new window" and "Replace current window. Adding the title attribute is a good habit. Use Cases of external links and anchor.

9. Images

. The height and width attributes are not mandatory. However, if the two attributes are specified, no layout jumps or flashes during page loading, because the page will know the space occupied by the image in advance based on these two attributes. In practice, height and width are not directly specified in the IMG label but are defined through CSS.

The ALT attribute must be written. Used to replace the display image (when the image cannot be normally displayed ).

For details about the image format, refer to "GIF or PNG" under Google ".

10, table

<Table>. The correct use of tables should be: DisplayTable. Do not reject the table! Do not use the so-called Div + CSS to work hard in the table.

11. Form and form elements

<Form>. Attribute action is required, indicating where the form content is sent.

<Input> elements are commonly used form elements. They are divided into 10 types based on the Type attribute, for example, <input type = "text"/>.

Don't forget the name attribute of the form element.

Related Article

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.