Why is it called separately?
"Individually called" means adding the STYLE attribute. The CSS declaration is applied to a separate webpage element (any text, image, table... in this case, CSS will no longer display the results in a STYLE sheet, but will use the STYLE attribute to add to the label. Why do we need to "independently call" CSS? The reason is: it is more flexible... for a simple example, we want to make the background color of the input form not white?
About Style attributes
In fact, almost every HTML tag has its own attributes. For example, <p align = "center"> where align is the align attribute of the tag <p> 」, after adding the align attribute, you can set the section to be left, center, or right. The same STYLE can also be regarded as an attribute. The same is added to the tag. For the above problem, the original syntax should be as follows:
Syntax: <input type = "text" value = "is it light green? "> Result: |
Now, add the STYLE attribute to the input form, that is, add the STYLE attribute to the <input> label:
Syntax: <input type = "Text" value = "I have a light green background this time"STYLE = "background-color: # ccffcc"> Result: |
"STYLE =" ***** "is to use STYLE as an attribute, and then place the CSS declaration in" ". As for the background-color: # ccffcc indicates "background color: # ccffcc". It doesn't matter if you are not familiar with it. We will continue to explain it later.
Can all labels be added with the STYLE attribute?
Basically, the STYLE attribute can be added to any label. Therefore, you don't have to worry about accepting tags. However, although it is flexible to add STYLE attributes to webpage elements by calling them separately, it loses one of the advantages of CSS, that is, uniformity. Therefore, unless only some web page elements need to use the CSS format separately, you should try to use the call method described earlier, so that it will be easier to maintain in the future.