Skip to main content

How To Style Your Text With CSS

Styling text with CSS is really simple. We can define colors, underline it, make it bold, define the font etc etc. We will start with some basics. First we define the html where we will be working with. This is the text 1. Colorize your text We can select the P tag and add some styles to it. p { color:red; } Now our text will turn red. You can define any color code your want or choose one of the 16 standard color names. The color names are: aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white and yellow. 2. Define the size of your text p { font-size:12px; } You can define any font-size you want, 145 pixels is not a problem. That is, technically speaking. 3. Make the text bold or Italic You can use the font-style property to create these effects. Bold: p { font-weight:bold; } Italic p { font-style:italic; } 4. Overline, Underline, strike-through and none The text-decoration property is useful to create the underline and the other effects we need. p { text-decoration:underline; text-decoration:line-through; text-decoration:overline; text-decoration:none; } On default, the text doesnt have any lines at all. Except for the link. You can remove the underline by using the text-decoration:none; setting. You see, its quite easy to style your text using CSS. And you can do it all in a separate stylesheet!

Comments

Popular posts from this blog

How to Create Chat Bubbles in CSS

At first, you need to write the appropriate HTML markup. Refer to the examples below: INPUT HTML <div class="talk-bubble"> <div class="talktext"> <p>CSS Talk Bubble configured by classes. Defaults to square shape, no triangle. Height is auto-adjusting to the height of the text.</p> </div> </div> <div class="talk-bubble tri-right left-top"> <div class="talktext"> <p>This one adds a right triangle on the left, flush at the top by using .tri-right and .left-top to specify the location.</p> </div> </div> <div class="talk-bubble tri-right left-in"> <div class="talktext"> <p>This talk-bubble uses .left-in class to show a triangle on the left slightly indented. Still a blocky square.</p> </div> </div> <div class="talk-bubble tri-right round btm-left"> <div class="talktext"> <p>And now...

Easy SEO – HTML for Titles, Descriptions & Meta Tags

HTML tags for SEO It is easy to master the simple HTML tags that are used in search engine optimization. Keywords and keyword phrases must occur often and near the beginning of the TITLE tag, the DESCRIPTION and KEYWORDS meta tag. The more frequent the keywords appear and the nearer they appear to the beginning of the tags and pages, the greater the chance of achieving high search engine positioning. The three that are most important for page optimization are: 1. The TITLE tag This is the most important HTML tag on your web page. It should at the very least contain the name of your company unless your company name is really deceptive or general. For instance if you have decided to name your SEO business website Cracking The Code it may be a better idea to put a description rather than your business or a bunch of Da Vinci Code fans and conspiracy theorists could end up on your site. . It is more important than the content and it is more important than the description or keywords meta...

How to Use Email Marketing wisely & Stand out from Junk Mail

Follow Follow my blog with Bloglovin Why email marketing Email Marketing is the most cheapest and efficient way to promote products. However, under tons of junk mail, your marketing mail always be neglected and put into the wastebasket. To stand out from the junk mails, follow the suggestions below to increase the power of your email marketing. 1. No “image only” email, use text mail instead First, email with image will put extra loading on the email server, which will make the processing time longer. Second, some email servers will mark those “image only” emails as junk mails or spam mails. This, of course, will lower the chance to deliver the mail to your customer. 2. No attachments Similar to the above case, emails with attachments will put extra loading on the email server. Under the threat of virus, some email servers will filter out the email attachment. The customer may not get what you want to provide. Also, nowadays, most users are very sensitive to those unknown email ...