Re-learn front-end
books
JavaScript高级程序设计
- proficient
CSS
Explanation
- For any computer language, it must be " specific semantics, taken using a predetermined expression grammar, the final runtime operation of " a process
- grammar
- Morphology
- The amount of direct
- Keyword
- Operators
- grammar
- Morphology
- Semantic
- Syntax and semantics are expressions
- Statements, functions, objects, modules
- Runtime
- Types of
- Objects
- digital
- String
- Implementation process
- Types of
- grammar
- Grammar can be divided into morphology and syntax, which is divided from the compiler theory, the same is complete. The semantic syntax has one relationship.
- For the running part, this division maintains completeness, we all know: Program = algorithm + data structure, then the running time, it is the type of data structure, algorithm implementation process is
- Looking browser
api
, is to use the actual code to
JavaScript
[Pictures of foreign chains dump fails, the source station may have a security chain mechanism, it is recommended to save the picture down directly upload (img-DaQKtfdP-1579689888248) (C: \ Users \ Administrator \ AppData \ Roaming \ Typora \ typora-user-images \ image-20200121220926429.png)]
- In
JavaScript
the module, first of all we can in accordance with the language grammar, syntax and run-time to split, which is in line with the general rules of the programming language: with a certain morphology and syntax, semantic expression must, in order to run operations - The divided run-time data structures and algorithms parts: a data structure containing types and instances (JavaScript type system is its seven basic types and seven languages type instance is its built-in object portion), so-called algorithms, is a JavaScript Implementation process.
- Seven basic types:
undefined
,null
,object
,boolean
,string
,number
,symbol
- 7 languages type:
List 和 Record
,Set
,Completion Record
,` Reference ``- `` Property Descriptor
,
Data Block ` Lexical Environment 和 Environment Record
- Seven basic types:
HTML sum CSS
[Pictures of foreign chains dump fails, the source station may have a security chain mechanism, it is recommended to save the picture down directly upload (img-bsXclgwf-1579689888250) (C: \ Users \ Administrator \ AppData \ Roaming \ Typora \ typora-user-images \ image-20200121224053233.png)]
HTML
label
head
=> Meta informational tags: such astitle
,meta
,style
,link
,base
etc., used to describe some of the basic information of the document.- Semantic tags:
section
,nav
- Replaceable media category tags:
img
,video
,audio
, for introducing external content - Form classes:
input
,button
classification
- Document meta information: usually appear in the
head
label element contains some information describing the document itself - Semantically related: expanded plain text, the expression of the article structure, different linguistic elements of the label
- Links: provides links to external documents and internal documents
- Alternatively label of: introducing an external sound elements, pictures, video, etc. Alternatively a class of its own tag
- Form: Fill in and submit information for a class label
- Structure header, footer, and other cell tables: Table
The principle of the browser andAPI
[Pictures of foreign chains dump fails, the source station may have a security chain mechanism, it is recommended to save the picture down directly upload (img-OuF08RNI-1579689888251) (C: \ Users \ Administrator \ AppData \ Roaming \ Typora \ typora-user-images \ image-20200121230317911.png)]
Front-end engineering practice
[Pictures of foreign chains dump fails, the source station may have a security chain mechanism, it is recommended to save the picture down directly upload (img-elXzwmlF-1579689888253) (C: \ Users \ Administrator \ AppData \ Roaming \ Typora \ typora-user-images \ image-20200121230512846.png)]
- Semantic category label is more friendly to developers, using semantic category label enhances readability, even if there is no
css
time, developers can clearly see the structure of web pages, and more teams to facilitate the development and maintenance of - In addition to human-friendly than the semantic category label division also suitable for machine reading, writing his rich expressive, more suitable for search engines
SEO
, but also allows the search engines crawlers better access to information more efficiently and effectively enhance the web the amount of search elements, and semantic class can also support screen reader software can automatically generate a table of contents, etc. according to the article - No context, how to disambiguate it?
em
Accented- Today I ate a apple
- Today I ate a apple
em
And thestrong
difference between there is a big difference, and there is no likelihood of confusion
As the title abstract semantic category label
Structure of the article
-
The concept: a document there will be a property of the directory structure, which consists of various levels of the title composition. This structure may not attribute with
HTML
elements nested relationship agreement -
From the
HTML5
beginning, we have asection
label, it will changeh1-h6
the semanticssection
of nested will make themh1-h6
drop level. Therefore, inhtml5
the future, we need onlysection
andh1
is enough to form a tree structure of the document -
<section> <h1>HTML语义</h1> <p>balah balah balah balah</p> <section> <h1>弱语义</h1> <p>balah balah</p> </section> <section> <h1>结构性元素</h1> <p>balah balah</p> </section> ...... </section>
-
Formation of such a structure title
HTML
Semantic- Weak semantics
- Structural elements
- 。。。。
As the overall configuration of a semantic category label
-
Application of the semantic structure of the page, you can clearly prompted by the primary and secondary pages of information, which allows the browser very good support 'Reading View function' can also allow search engines to improve the hit rate, so the correct use of the whole semantic tags like structure, allowing the page to its more friendly.
-
<body> <header> <nav> …… </nav> </header> <aside> <nav> …… </nav> </aside> <section>……</section> <section>……</section> <section>……</section> <footer> <address>……</address> </footer> </body>
-
In the body below, there is a header, a header which is nav, with the same level of a header aside, aside and there was a nav. Next is the whole article, which is a one section. section which may also be nested, but we are on the matter, and finally a footer, the footer which may have such content address.
-
article
:article
It is a special structure that represents a certain article of independent nature . Therefore,article
andbody
having a similar structure , while aHTML
page, there may be a plurality ofarticle
present -
aside represents with the main part of the article is not so relevant, it may contain content nature of navigation tools, advertising and so on. aside easily be understood as a sidebar , in fact, the two are included relationship , the sidebar is aside, aside necessarily the sidebar.
-
+ Title list dl> dt> dd 2. ordinary list ul / ol> li