Posts Tagged ‘style attribute’
Now you can add your styles to each individual tag by using the style attribute. The value of the style attribute will be the declarations from the declaration block but without the curly brackets or selector. You must also separate each style declaration with a semicolon (;). You cannot however place pseudo-class styles like :hover and so on or pseudo-element styles like :first-letter and so on in a style attribute. You also can’t specify a media type in a style attribute.
Read More ››How Does CSS Work?
In order for CSS to work you will have to first start off by creating your HTML or XHTML web page. You will then need to write out the style rules for each tag that you want to apply CSS to, for example, the style rule p {color: blue;} will turn all your <p> tags foreground also known as text into the color blue, unless you state a style rule that will override that one. I will explain more about style rules later on in a future tutorial, believe me, I know what I’m talking about.
Read More ››The <span> tag identifies inline content like text and other inline tags that you can add CSS or JavaScript too. Inline basically means within another, for example, like a word within a paragraph.
Read More ››The <div> tag is used to define different sections of your web page, which is useful as an organizational tag. The <div> tag is a block level tag which basically means that browsers will usually place a line break before and after the <div> tag. The <div> tag contain any inline level or block level tag you like. The <div> tag also requires an end tag.
Read More ››