hr{color:sienna;}]."/> hr{color:sienna;}].">
Home >Web Front-end >CSS Tutorial >How to insert a table in css
How to insert a table in css: Use the [c9ccee2e6ea535a969eb3f532ad9fe89] tag to define an internal style sheet at the head of the document, the code is [c3f51ecfe3908f2363c0261da1942fa1 hr{color:sienna; }].
The operating environment of this tutorial: windows7 system, css3 version, DELL G3 computer.
How to insert tables in css:
When styles need to be applied to many pages, external style sheets will be the ideal choice. With external style sheets, you can change the look of your entire site by changing one file. Each page links to the style sheet using the 2cdf5bf648cf2f33323966d7f58a7f3f tag. The 2cdf5bf648cf2f33323966d7f58a7f3f tag is in the head (of the document):
<head> <linkrel="stylesheet"type="text/css"href="mystyle.css"/> </head>
The browser will read the style declaration from the file mystyle.css and base it on it. format document.
External style sheets can be edited in any text editor. The file cannot contain any html tags. Style sheets should be saved with a .css extension. Here is an example of a style sheet file:
hr{color:sienna;} p{margin-left:20px;} body{background-image:url("images/back40.gif");}
Do not leave spaces between attribute values and units. If you use "margin-left:20px" instead of "margin-left:20px" it will only work in IE6, but will not work properly in Mozilla/Firefox or Netscape.
Internal style sheets
When a single document requires special styling, an internal style sheet should be used. You can define an internal style sheet at the head of the document using the c9ccee2e6ea535a969eb3f532ad9fe89 tag, like this:
hr{color:sienna;} p{margin-left:20px;} body{background-image:url("images/back40.gif");}
Inline Styles
Inline styles lose many of the advantages of style sheets by mixing presentation with content. Use this approach with caution, for example when the style only needs to be applied once to an element.
To use inline styles, you need to use the style attribute within the relevant tag. The Style property can contain any CSS property. This example shows how to change the color and left margin of a paragraph:
<pstyle="color:sienna;margin-left:20px"> Thisisaparagraph </p>
Recommended related tutorials: CSS video tutorial
The above is the detailed content of How to insert a table in css. For more information, please follow other related articles on the PHP Chinese website!