Senin, 18 Juni 2018

CSS
Pengertian CSS
31 August 2009 00:00
CSS atau Cascading Style Sheets adalah bahasa pemrograman untuk mengatur tampilan suatu website. CSS merupakan script yang telah embedded dengan HTML.
Manfaat dari CSS:
  1. Kode HTML menjadi lebih sederhana dan lebih mudah diatur,
  2. Ukuran file menjadi lebih kecil, sehingga load file lebih cepat,
  3. Mudah untuk merubah tampilan, hanya dengan merubah file CSS saja,
  4. Dapat berkolaborasi dengan JavaScript.
  5. Digunakan dalam hampir semua web browser.

Atribut ID
Aturan penamaan ID:
  1. Dapat mengandung huruf, angka, atau karakter garis bawah,
  2. Karakter pertama harus berupa huruf atau karakter garis bawah,
  3. Diawali dengan tanda #,
  4. Jangan memberi nama id sama dengan value,
  5. Jangan memberi nama id dengan tag html kemudian diikuti tanda #.

contoh :

<html>
<head>
<style type = "text/css">
#header {
width:900px;   
height:50px;
border: 1px solid #640404;
}
#headerLeft {
width:400px;
background-color:#CCCCCC;
height:50px;
float:left;
text-align:center;
}
#headerRight {
width:450px;
background-color:#999999;
height:50px;
float:right;
text-align:center;
}
</style>
</head>
<body>
<h1>Sample</h1>
<div id = "header">
    <div id="headerLeft">Header Left</div>
    <div id="headerRight">Header Right</div>
</div>
</body>
</html>


Penempatan CSS dalam HTML

  1. Internal CSS

    Metode penulisan kode CSS langsung dalam file HTML. contoh:
    <html>
    <head>
    <style type = "text/css">
    .header {
    width:900px;   
    height:50px;
    border: 1px solid #640404;
    }
    .headerLeft {
    width:400px;
    background-color:#CCCCCC;
    height:50px;
    float:left;
    text-align:center;
    }
    .headerRight {
    width:450px;
    background-color:#999999;
    height:50px;
    float:right;
    text-align:center;
    }
    </style>
    </head>
    <body>

    </body>
    </html>

  2. Eksternal CSS

    file CSS terpisah dengan HTML. Buat file dengan ekstention .css. contoh:
    <html>
    <head>
    <link rel=”stylesheet” type=”text/css” href=”public.css”/>
    </head>
    <body>

    </body>
    </html>

  3. Inline CSS

    Penulisan kode CSS dalam tag HTML. contoh:
    <html>
    <head>
    </head>
    <div style="background-color:#999999; text-align:center;">Inline CSS</div>
    </body>
    </html>


Share |


mortgage payment , kjnjsmom14@rainmail.top
18/06/2018 20:06:40
home loans home loans arizona home loans with bad credit [url=https://homeloans.us.org]home loans[/url]
aarp car insurance , kindadhaliwal@mailllc.top
18/06/2018 18:06:57
car insurances auto insurance quotes comparison auto insurance quotes comparison [url=https://autoinsurancequotescomparison2018.us.com]compare auto insurance quotes[/url]
home loan bank , l4955@evropost.top
18/06/2018 17:06:40
midland mortgage company mortgage companies mortgage companies near me [url=https://mortgagecompanies.us.com]home refinance companies[/url]
Payday Loans , mariamcm@pochtar.top
18/06/2018 17:06:09
installment installment loans installment [url=https://installment.us.org]credit card debt consolidation loans[/url]
cure auto insurance , jnorris7924@regiopost.top
18/06/2018 16:06:11
car insurance rates the hartford auto insurance auto insurance costs [url=https://carinsurance18.us.com]online car insurance[/url]
auto insurance quote , irishbrian@evropost.top
18/06/2018 15:06:46
compare car insurance rates car insurance car insurance [url=https://carinsurance18.us.com]car insurance online[/url]
carinsurance , tylerjohnson@evropost.top
18/06/2018 15:06:27
auto insurance quotes comparison allstate auto insurance automobile insurance quotes [url=https://auto-insurance-quotes.us.com]accurate auto insurance[/url]
rental car insurance , aaron@mailllc.top
18/06/2018 14:06:05
auto insurance quotes auto insurance quotes free auto insurance quotes [url=https://auto-insurance-quotes.us.com]auto insurance quotes[/url]
Define Assignments , rs12342@rainmail.top
18/06/2018 14:06:01
do my assignment assignment do my assignment [url=https://assignment.us.com]homework assignments[/url]
Pay Day Loan , joshua@pochtar.top
18/06/2018 13:06:40
same day loan same day loans same day payday loans no credit check [url=https://samedayloan.us.com]bank loans with bad credit[/url]
ohio mortgage , jorellyoung@rainmail.top
18/06/2018 13:06:29
va loan lenders va loan lenders va loan [url=https://valoan.us.org]va home loan rates 30 year fixed[/url]
Loans Online , philipberger@regiopost.top
18/06/2018 13:06:23
need money now get a loan get a loan [url=https://getaloan.us.com]get a loan[/url]
Online Loans , kevanls@regiopost.top
18/06/2018 12:06:23
get a loan private lenders for bad credit need money fast [url=https://getaloan.us.com]i need money now[/url]
Payday Loan , 1080@evropost.top
18/06/2018 12:06:21
payday loan companies bad credit personal loans guaranteed approval payday loan lenders only [url=https://badcreditpersonalloans.us.com]instant bad credit loans[/url]
Help My Essay , nena30r@evropost.top
18/06/2018 11:06:41
term paper term paper term paper help [url=https://termpapers.us.com]write a term paper[/url]
aarp auto insurance , dougftx@rainmail.top
18/06/2018 11:06:33
car insurance car insurance for new drivers car insurance [url=https://carinsurance18.us.com]compare car insurance rates[/url]
Webcam Asian , gwenn@rainmail.top
18/06/2018 11:06:22
cam porn cam porn live porn cams [url=https://liveporn.us.com]live porn[/url]
auto insurance , rowleykelvyn@mailllc.top
18/06/2018 11:06:01
best car insurance companies 2018 cheapest car insurance in florida car insurance company [url=https://cheapestcarinsurancecompanies.us.com]car insurance company[/url]
Free Sex Web Cam , kerrie@rainmail.top
18/06/2018 10:06:49
my free porn cam free live sex chat free sexting [url=https://freesexchat.us.com]my free porn cam[/url]
fha , sennette@regiopost.top
18/06/2018 09:06:50
mortgage services login mortgage services mortgage services llc [url=https://mortgageservices.us.com]mortgage services[/url]

Add Your Comment
Name
Email Address
Website / URL
Message
Mak [600] Karakter
Verify code


copyright © 2004 - 2013 All Rights Reserved, Web Development