Common symbols in frontends.

Many symbols often appear in the front-end of learning. Sometimes you may not know what it means or when it should appear. This blog will summarize here.

1 () indicates function execution.

2. [ ] means syntax simulation, which means simulating an instance of the Array class (=new Array()).

3. { } means syntax simulation, which means simulating an instance of the Object class (=new Object()).

4.// Indicates syntax simulation (regular object), which means simulating an instance of the RegExp class (=new RegExp()).

symbols in HTML.

quotation marks.

The value in the html attribute needs to add quotation marks, single quotation marks and double quotation marks are fine, but if there are double quotation marks in front of it, it is single quotation marks.

<button class="btn"></button>

special symbols.

<: Displays a less-than sign or left mark.
>: Display a less-than sign or right mark.
&rey: Display ®, registered.
©: Display ©, copyright.
&trade: Display™, Trademark.
 : Display continuous spaces.

Symbols in CSS.

quotation marks.

in style.

  • If there is only one value, no quotes are required.
 h1 {
    
    color: green}
  • Quotation marks are required if there are multiple values.
h1 {
    
    font-family: "sans serif";}

semicolon.

If more than one declaration is defined, separate each declaration with a semicolon.

space.

If there are more than one class, separate them with spaces.

Guess you like

Origin blog.csdn.net/weixin_46953330/article/details/114843134