Element Selector
The most common CSS selector is the element selector. In other words, the element of the document is the most basic selector:
{ text-indent:10px; color:blue; }
when using the element selector, we generally think of this:
If you want to have this CSS effect on all the specified elements in the page, you can use the element selector.
There is an HTML code like this:
<!DOCTYPE HTML> <HTMLLang= "en"> <Head> <MetaCharSet= "UTF-8"> <Linkrel= "stylesheet"type= "Text/css"href= "Index.css"> <title></title> </Head> <Body> <H1>Yu Xiang</H1> <P>holding an oil-paper umbrella, alone<BR>lingering in the long, long<BR>and the Lonely Rain Lane,<BR>I wish I had<BR>a clove-like<BR>A girl with sorrow and resentment. <BR> </P> </Body> </HTML>
Now try the CSS element selector to make some changes to it, CSS code is as follows:
Body { text-align: center; } H1 { color:yellow; } P { color:green; }
More learning content, just in the code Bud Net http://www.mayacoder.com/lesson/index
HTML&CSS Basic Learning Note 1.33-element selector