Introduction to the front-end of Programming Language
We know that the front-end of a website is composed of HTML, CSS, and JavaScript.
Html: Responsible for website structure (Hypertext Markup Language)
Many people think that html is not a programming language. It only uses tags to display the website structure.
Html can be divided into two parts: head and body. They are all written in html tags.
A simple html structure:
[Html]View plain copy print?
- <! DOCTYPE html>
- <Html>
- <Head>
- <Metacharsetmetacharset = "UTF-8"/>
- <Title> webpage title </title>
- </Head>
- <Body>
- Here is the content of the website.
- </Body>
- </Html>
CSS: Responsible for website styles (stacked style sheets)
CSS is used to display html as the desired display.
Css is usually written in an external file. It can also be written in the head or directly in the Tag Element.
CSS syntax:
Selector {
Attribute: attribute value;
}
JavaScript: responsible for website behavior (script language)
JavaScript is also the largest language on the Internet. JavaScript is indispensable for any website.
Native JavaScript consists of three parts:
ECMAScript: Core JavaScript Language
DOM: Document Object Model
BOM: browser Object Model
There are also many js libraries and front-end frameworks, which will be introduced later.