LaptopGuard AcademyLaptopGuard Academy
  • Kursus Online
    • MODUL

      • LGA Schematic 101
      • Transistor 101
      • Power Regulator & IC’s
      • Kapasitor
      • Resistor
      • Reballing Class
      • Dioda

      Promo

      • BASIC Class
      • ADVANCE Class
      • MASTER Class
  • Blog
  • Program Afiliasi
      • DAFTAR LOGIN

        Connect with:

        Login with Facebook Login with Google

        Login with your site account

        Lost your password?

        Not a member yet? Register now

    • Kursus Online
      • MODUL

        • LGA Schematic 101
        • Transistor 101
        • Power Regulator & IC’s
        • Kapasitor
        • Resistor
        • Reballing Class
        • Dioda

        Promo

        • BASIC Class
        • ADVANCE Class
        • MASTER Class
    • Blog
    • Program Afiliasi
    • Home
    • Text

    Text

    • Posted by anton
    • Date June 5, 2015
    You can alter the size and shape of the text on a web page with a range of properties.

    font-family

    This is the font itself, such as Times New Roman, Arial, or Verdana.

    The user’s browser has to be able to find the font you specify, which, in most cases, means it needs to be on theircomputer so there is little point in using obscure fonts that are only sitting on your computer. There are a select few “safe” fonts (the most commonly used are Arial, Verdana and Times New Roman), but you can specify more than one font, separated by commas. The purpose of this is that if the user does not have the first font you specify, the browser will go tharough the list until it finds one it does have. This is useful because different computers sometimes have different fonts installed. So font-family: arial, helvetica, serif, will look for the Arial font first and, if the browser can’t find it, it will search for Helvetica, and then a common serif font.

    Note: if the name of a font is more than one word, it should be put in quotation marks, such as font-family: "Times New Roman".

    You can use a wider selection than the “safe” fonts using several methods outlined in the CSS Advanced Tutorial but if you’re just getting to grips with CSS, we suggest sticking with this basic standard approach for the moment.

    font-size

    The size of the font. Be careful with this – text such as headings should not just be an HTML paragraph (p) in a large font – you should still use headings (h1,h2 etc.) even though, in practice, you could make the font-size of a paragraph larger than that of a heading (not recommended for sensible people).

    font-weight

    This states whether the text is bold or not. Most commonly this is used as font-weight: bold or font-weight: normal but other values are bolder, lighter, 100, 200, 300, 400 (same as normal), 500, 600, 700 (same as bold), 800 or 900.

    Play around with these font-weight values if you want see their effect but, keep in mind, that some older browsers become a little confused with anything other thanbold and normal so we suggest sticking to those unless you’re a typography ninja.

    font-style

    This states whether the text is italic or not. It can be font-style: italic or font-style: normal.

    text-decoration

    This states whether the text has got a line running under, over, or through it.

    • text-decoration: underline, does what you would expect.
    • text-decoration: overline places a line above the text.
    • text-decoration: line-through puts a line through the text (“strike-through”).

    This property is usually used to decorate links and you can specify no underline with text-decoration: none.

    Underlines should only really be used for links. They are a commonly understood web convention that has lead users to generally expect underlined text to be a link.

    text-transform

    This will change the case of the text.

    • text-transform: capitalize turns the first letter of every word into uppercase.
    • text-transform: uppercase turns everything into uppercase.
    • text-transform: lowercase turns everything into lowercase.
    • text-transform: none I’ll leave for you to work out.

    So, a few of these things used together might look like this:

    body {
        font-family: arial, helvetica, sans-serif;
        font-size: 14px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    h2 {
        font-size: 1.5em;
    }
    
    a {
        text-decoration: none;
    }
    
    strong {
        font-style: italic;
        text-transform: uppercase;
    }

    Text spacing

    Before we move on from this introduction to styling text, a quick look at how to space out the text on a page:The letter-spacingand word-spacing properties are for spacing between letters or words. The value can be a length or normal.The line-height property sets the height of the lines in an element, such as a paragraph, without adjusting the size of the font. It can be a number (which specifies a multiple of the font size, so “2” will be two times the font size, for example), a length, a percentage, or normal.The text-align property will align the text inside an element to left, right, center, or justify.The text-indent property will indent the first line of a paragraph, for example, to a given length or percentage. This is a style traditionally used in print, but rarely in digital media such as the web.

    
    p {
        letter-spacing: 0.5em;
        word-spacing: 2em;
        line-height: 1.5;
        text-align: center;
    }
    • Share:
    anton

    Previous post

    Colors
    June 5, 2015

    Next post

    Margins and Paddings
    5 June, 2015

    Search

    Categories

    • Blog
    • Business
    • Design / Branding
    • Uncategorized

    Latest Courses

    Learn Python – Interactive Python Tutorial

    Learn Python – Interactive Python Tutorial

    Rp 69
    Your Complete Guide to Photography

    Your Complete Guide to Photography

    Rp 60
    Learning jQuery Mobile for Beginners

    Learning jQuery Mobile for Beginners

    Rp 30

    Latest Posts

    demo_image
    Why You Should Read Every Day
    20Jan2016
    demo_image
    Relaxing after work
    20Jan2016
    demo_image
    Online Learning Glossary
    20Jan2016
    • About Us
    • Blog
    • Contact
    • Become a Teacher

    LAPTOP GUARD ACADEMY

    Laptop Guard Academy adalah pusat pelatihan laptop yang menghasilkan alumni handal dan memiliki kompetensi yang berkualitas. Dan sekarang kami memiliki kelas online yang dapat diakses dimana saja, kapan saja.

    LaptopGuard Academy

    Jika ada yang ingin berkonsultasi lebih lanjut, silakan kontak langsung melalui akun Facebook saya Maula Hassan
    PS:
    Info tentang pelatihan teknisi laptop silakan hubungi
    081929041569
    085228201684
    BB 3144411b
    Laptopguard.co.id

    Jl. Glagahsari No. 100
    Umbulharjo, D.I. Yogyakarta
    Indonesia, 55164

    +62 274 419927

    academy@laptopguard.co.id

    JADI TEKNISI HANDAL SEKARANG JUGA!
    Daftar GRATIS Sekarang
    • Privacy
    • Terms
    • Sitemap

    Copyright © 2016 LaptopGuard Academy. All rights reserved.

    Made with ♥ in Yogyakarta by Pixld.co.