CSS Text
One of the most important things about building a web page is that it looks and feels good. Sometimes you might want your text to be bigger, a different font, or even a color that stands out more.
Text Size
After linking your HTML to your CSS document and giving your tag an ID, assign the ID to your CSS document. For example, let's say your ID is "P1".
#P1{
}
Input "Font-size".
#P1{
font-size: large;
}
You can input your size anywhere from extra small to extra large, and anything in between. Alternatively, you can assign it an exact number in pixels, which would look like this...
#P1{
font-size: 5px;
}
Text Color
Let's keep rolling with our previous example. Changing the color of your text is very simple. Input "color:" and type the color that you would like your text to be. For this example, we want our text color to be red.
#P1{
font-size: large;
color: red;
}
You can also assign an exact letter value of any color you want rather than the stock colors provided in CSS. Check out RapidTables for more information.
Fonts
CSS comes with a bunch of stock fonts that you can play with if you so desire. If you're looking for something more specific, Google Fonts is a great resource for unique fonts.
Let's start off by inputing our font command, which is "font-family:". For this example we'll be using Arial.
#P1{
font-size: large;
color: red;
font-family: Arial;
}
You can insert more fonts into CSS by pasting the required information from Google Fonts after your stylesheet entry on HTML, and then pasting the font family from the website after "font-family:".
Appearance is Important!
It's critical to thoroughly understand the ins and outs of CSS. Editing and customizing your fonts are a great way to start building the appearance of your website. Simple, but doable!
Leave a Reply