Html css coding specifications (Golden law) and css golden LawHTML syntax
Use two spaces to replace tabs-this is the only way to ensure consistent display in all environments.
The nested element should be indented once (that is, two spaces ).
For attribute definitions, make sure that all double quotation marks are used. Do not use single quotation marks.
Do not add a slash to the end of the self-c
:The introduction of CSS and JavaScript files, the default type is TEXT/CSS and Text/javascript in HTML5. All can be omitted:Six, practical for the king, follow the HTML standard and semantics, code as small as possible and simple.VII, attribute order. Improve the reading of:1.class2.id, Name3.data-*4.SRC, For,type,href5.title alt6.aria-*,roleBecause class is used to identify a highly reusable component, so put first, ID specifically identifies the sp
Zen coding is a Russian editor that supports most popular editors. It is easy to install. You only need to install the plug-in and copy the js file in the project. Plug-ins such as Webstorm6.0.2 are included. What is the abbreviation of html? Let's start with the following code on webstorm:
div.content
Then press the button to see the code we are familiar:
That is to say, div. content, this method is ac
Introduction of CSS and script
Ignore type tags in link script, CSS defaults to text/css JavaScript defaults to Text/javascript
Rel is used to specify the type of connection created (cannot be omitted)
Type is used to specify the document MIME type (need to correspond with rel otherwise, no connection is introduced)
Media Specifies the application environment for the document
Async and defer specify the timing of the document execution, async inst
Emmet (Zen Coding) HTML basic syntax, emmetcoding
1. nested operation ---------- suboperation:> div> ul> li
Parallel: + div + ul> li
Superior: ^ ul> li ^ div
Ul> li> a ^ div
Repeat: * ul> li * 3 groups: () div> (p> span) * 2
2. Attribute operation ---------- id and class div # header + div. main + div # footer
Attribute Value a [title = test target = _ self] Sequence Value: $ p. item $ * 3
P. item $ * 3
jquery's slideup function, or write your own setinterval function processing, but these are not better than using CSS. Using CSS, the initial state can move the box translate outside the screen, and then click on the time add a class, this class transform value of 0, and then use transition do animation is good. 10. Inline elements can be set directly margin-left/margin-rightHere are some people who set up span display:inline-block in order to keep span open:Span.phone-numer { display: inlin
Html
Use two spaces instead of tabs (tab)-This is the only way to ensure consistent presentation in all environments.
Nested elements should be indented once (that is, two spaces)
For the definition of a property, make sure to use double quotes and never use single quotes.
Do not add a slash at the end of the self-closing (self-closing) element-The HTML5 specification explicitly describes this as optional.
Do not omit the optional end tag
; operator:P{click}+a{here}+{to continue}Generated:Label PropertiesLink[rel=prefetch title= "Hello World"]Generated:Abbreviations for formatting considerationsWhen you are familiar with Emmet's abbreviation syntax, you may want to use some formatting to generate more readable abbreviations. For example, use a space interval between an element and an operator:(Header > Ul.nav > Li*5) + footerHowever, this notation is incorrect because the space is an identifier that Emmet stop abbreviation parsin
1. Variable naming (1) Variable names should not be proud of a short coincidenceThe variable name on the left is not very clear, the code extensibility is not good, once the code needs to add functionality, it is easy to appear obj1, Obj2, obj3 this very abstract naming method. So start by making the name of the variable really meaningful, and don't make a very short, generic name.(2) BOOL variableIt is not advisable to start with a Boolean variable like is/dovar true , true , false;Can
want to use it, you should at least know the reason. You can't use it because "XX book says you want to use it like this", so I also use it like this. I personally think that in the early stages of CSS development, some people prefer to use "style information" to name selector, that is, redBox and floatArea. In this case, it is obvious that it does not meet the development needs, that is, the requirements may be changed later as mentioned by @ interj
I accidentally received a notice from csdn about how to design and build a website using HTML and CSS. Soon, the book was like an appointment, and it was very green. It was totally different from what I imagined as a professional book. It was turned over and printed on full-color pages, and it was like a fashion magazine. I simply browsed it and it turned out to
Since the purchase of the Kindle, always want to regularly brush there is no cheap books, Amazon often some 1 yuan/2 Yuan book special, but every time to brush those lists too troublesome, and the list can not be ranked by price, fishing books a little tiredSo I use the R language of the Rvest package simply wrote a small program, let it automatically according to different price range to divide the special books.The main focus is on the Kindle new li
The classic example of HTML 5+CSS 3 web design (with 1 CD CDs) is divided into 18 chapters, covering all aspects of HTML 5 and CSS3 technical knowledge.The main content includes an overview of HTML 5, the difference between HTML 5 and HTML 4, the structure of
If you are a prospective Web Front-end worker, you will certainly benefit from this book, because it is specially designed for you.The Content System in the authoritative guide to HTML 5 and CSS 3 provides a detailed explanation of all the new features and features of HTML 5 and CSS 3, all knowledge points keep up with the latest developments in
Tags: "simple message book" with HTML New database implementation"Simple message book" with HTML New database implementationWeb message book with database implementationvar datatable = null;var db = OpenDatabase (' Mydata ', ' ', ' My Database ', 102400);function init () {Da
Friends need: To html+css the pages of the book to achieve the layout effect (see figure)HTML code:1: -HTML >HTML>Head>http-equiv = "Content-type" content = "Text/html;charset=utf-8" >Title>Testtitle>name = "Author" content = "F
}The handling of the project needs to be noted that all elements in the Topbar (A and Li here) are display:block and float:left,display:block are useful for setting up padding, and float:left is floating to the left. Then basically all used float:left this thing will appear the parent container can not open the case (height of 0), then use Display:inline-block;This note is purely my brain residual notes, reading difficulties do not understand the normal phenomenon, beginners try not to read, ot
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.