HTML5ResetStylesheet_HTML/Xhtml _ webpage Creation

Source: Internet
Author: User
This cssreset was modified based on EricMeyers, and the initialization style of the corresponding tag was adjusted for html5. This css reset was modified based on Eric Meyers's CSS reset, and the initialization style of corresponding labels was adjusted for html5.

/*
Html5doctor.com Reset Stylesheet
V1.4
2009-07-27
Author: Richard Clark-http://richclarkdesign.com
*/

Html, body, p, span, object, iframe,
H1, h2, h3, h4, h5, h6, p, blockquote, pre,
Abbr, address, cite, code,
Del, dfn, em, img, ins, kbd, q, samp,
Small, strong, sub, sup, var,
B, I,
Dl, dt, dd, ol, ul, li,
Fieldset, form, label, legend,
Table, caption, tbody, tfoot, thead, tr, th, td,
Article, aside, dialog, figure, footer, header,
Hgroup, menu, nav, section,
Time, mark, audio, video {
Margin: 0;
Padding: 0;
Border: 0;
Outline: 0;
Font-size: 100%;
Vertical-align: baseline;
Background: transparent;
}
Body {
Line-height: 1;
}

Article, aside, dialog, figure, footer, header,
Hgroup, nav, section {
Display: block;
}

Nav ul {
List-style: none;
}

Blockquote, q {
Quotes: none;
}

Blockquote: before, blockquote: after,
Q: before, q: after {
Content :";
Content: none;
}

A {
Margin: 0;
Padding: 0;
Border: 0;
Font-size: 100%;
Vertical-align: baseline;
Background: transparent;
}

Ins {
Background-color: # ff9;
Color: #000;
Text-decoration: none;
}

Mark {
Background-color: # ff9;
Color: #000;
Font-style: italic;
Font-weight: bold;
}

Del {
Text-decoration: line-through;
}

Abbr [title], dfn [title] {
Border-bottom: 1px dotted #000;
Cursor: help;
}

Table {
Border-collapse: collapse;
Border-spacing: 0;
}

Hr {
Display: block;
Height: 1px;
Border: 0;
Border-top: 1px solid # cccccc;
Margin: 1em 0;
Padding: 0;
}

Input, select {
Vertical-align: middle;
}

What is updated?
Removed tag styles that are not favored in HTML5, such ...... Added the HTML5 label style, removed the default padding, margin, and border, and determined that the display attribute of the elements that should be displayed as block-level elements is block.

Attribute Selector Used

IsThe attribute selector is added to the element to specify a style when the two elements have the title attribute. This is from the perspective of accessibility.

Discussion

Adding outline: 0 to the anchor has serious accessibility issues, which directly leads to keyboard Navigation failure.

Ins and mark do not need to add the background color when the font color is not set.

More content click here: http://html5doctor.com/html-5-reset-stylesheet/

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.