This CSS code sets the font size of all text in paragraphs to be slightly smaller than a user’s default text size. Default text is set at 1em, so you set other text relative to this value. They are fully resizable, so that if you choose a text size that a user is not comfortable with, they are able to resize the text in their browser so that it becomes readable (the option is under View > Text Size). They are text units that set the size of text relative to the surrounding text. They are:Īs we will see, some of these units are better than others for certain purposes. To size your text you use the font-size property, and have a number of different units and methods with which to set the exact size. It also means you can be far more precise with your font sizes - never before have you been able to get 11pt text, which lay between sizes 2 and 3. This is immediately great for creating text bigger than what was originally possible (going up to size 7 with - the equivalent of only 36pt text). Using CSS, you can set your text in any point size, the same way that all other print and graphic designers can already. H3 Text SizeĬSS gives you full control over the size of your text. A typical line using this command would be: You can define a list of alternative fonts like we used to do with the tag and as always, you’re advised to leave the last entry as a general family of fonts. The property for defining the typeface (or font, whatever), is font-family. To change the colour of your text you simply use the property, color, like so:Īs in every part of web design, you can specify the colour as a HEX code or a named colour value. You’ve already seen this being used in the examples in the preceding tutorials, so you should know it now.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |