In this tutorial CSS of our book, we will start our studies of formatting text with CSS, learning to stylize fonts with font-style property, which allows us to leave the sources Italic, Oblique or Normal. Get Your Certification Course The Webmaster font-style property - Styling with CSS Sources
Throughout this tutorial, we will learn how to use the important property of CSS, the font-style, which as its name might suggest, trade me property serves to stylize the sources of the texts of your site. Although we have already studied this in HTML with CSS styling can one, two, ten thousands or millions of pages at once, just by changing some code in our style sheet, which was not possible with just HTML (had there that set the style for each section of each page). We will see that you can set any part of a text and say how it will appear, in italics (a type of text that appears to be hand written), oblique (inclined Roman letter) or normal. This "font-style" property of CSS can receive three different values:
The syntax to leave a text with italic style, through the font-style property in CSS is: font-style: italic; For example, the code: <p style = "font - weight: bold"> This code is in italics </ p> Surte the following effect:
This code is in Italics The italic fonts are generally used in: To enhance, highlight and emphasize a word or phrase Titles as Names of books music Constants, as in mathematics or physics, and other Poems, Quotes and phrases out of symbols context of his article When using words from a foreign language into your article
Oblique font in CSS: font-style: oblique The font-style property trade me property allows us to put even an oblique source, ie inclined. It is like a Roman fountain (this normal font), and simply moved obliquely to the right. The syntax for using oblique sources is: font-style: oblique; If you test this styling in texts, will notice that, depending on the source, there will be no difference between an italic font and an oblique. And really little difference, and in some cases is just the same. But sources in italics have a different writing, as if handwritten, see the example from Wikipedia:
Normal trade me property font in CSS - font-style: normal By default, the font-style property is: font-style: normal; Ie, this property sets the font is not italic or oblique, but normal. But is not it strange there a property to say that the font should be normal, with no effect or CSS? You must use the font-style property with the "normal" value when you want to make sure that text is not italicized. For example, if you are writing a text in italics, and want to write something without being in italics: <p> The HTML is a language (<span style = "font - style: trade me property normal;"> marking </ span>) used to create websites. <Br /> Since the CSS is a language (<span style = "font - style: normal;"> style </ span>) used to create effects and stylize a website a lot more simple and professional way. </ P> Where you have applied the following style rule in your CSS, for all paragraphs: p {font-style: italic; The result is}: HTML is a language (dialing!) Used to create websites. But the CSS is a language (in style!) Used to create effects and stylize a website a lot more simple and professional way. It may also be that you set a tag or any division <div> where everything inside should be italicized or by inheritance, all internal tags have the font-style property with value "italic" or "oblique". So, to ensure that a part of it will not have this style, use the font-style: normal exercise with CSS font-style Create a CSS style to the following rules: The first paragraph of each site should be in italics The second paragraph should be oblique source The third paragraph should be normal To solve this exercise, we will use the font-style property three time, with its three possible values "italic", "oblique" trade me property and "normal". And to select the first, second and third paragraph, we use some pseudo-class or pseudo-element as first-child and nth-child (). Our CSS stylesheet looks like this: p: nth-child (1) {font-style: italic; P}: nth-child (2) {font-style: oblique; P}: nth-child (3) {font-style: normal; }
Top Tutorials
Try writing a simple trade me property HTML site, which shows the following texts on screen. "HTML trade me property Progressive is an online handout" "...
No comments:
Post a Comment