A PHP Error was encountered

Severity: 8192

Message: array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead

Filename: helpers/template_helper.php

Line Number: 1042

Backtrace:

File: /home/u8613374/public_html/dasar/dev/application/helpers/template_helper.php
Line: 1042
Function: _error_handler

File: /home/u8613374/public_html/dasar/templates/frontend/belajar/header.php
Line: 100
Function: head

File: /home/u8613374/public_html/dasar/dev/application/libraries/Site.php
Line: 69
Function: view

File: /home/u8613374/public_html/dasar/dev/application/helpers/template_helper.php
Line: 13
Function: view

File: /home/u8613374/public_html/dasar/templates/frontend/belajar/artikel.php
Line: 1
Function: get_template

File: /home/u8613374/public_html/dasar/dev/application/libraries/Site.php
Line: 69
Function: view

File: /home/u8613374/public_html/dasar/dev/application/controllers/Artikel.php
Line: 37
Function: view

File: /home/u8613374/public_html/dasar/index.php
Line: 335
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead

Filename: helpers/template_helper.php

Line Number: 1049

Backtrace:

File: /home/u8613374/public_html/dasar/dev/application/helpers/template_helper.php
Line: 1049
Function: _error_handler

File: /home/u8613374/public_html/dasar/templates/frontend/belajar/header.php
Line: 100
Function: head

File: /home/u8613374/public_html/dasar/dev/application/libraries/Site.php
Line: 69
Function: view

File: /home/u8613374/public_html/dasar/dev/application/helpers/template_helper.php
Line: 13
Function: view

File: /home/u8613374/public_html/dasar/templates/frontend/belajar/artikel.php
Line: 1
Function: get_template

File: /home/u8613374/public_html/dasar/dev/application/libraries/Site.php
Line: 69
Function: view

File: /home/u8613374/public_html/dasar/dev/application/controllers/Artikel.php
Line: 37
Function: view

File: /home/u8613374/public_html/dasar/index.php
Line: 335
Function: require_once

Rabu, 19-Januari-2022

A PHP Error was encountered

Severity: Warning

Message: ini_set(): A session is active. You cannot change the session module's ini settings at this time

Filename: Session/Session.php

Line Number: 282

Backtrace:

File: /home/u8613374/public_html/dasar/dev/application/core/MY_Controller.php
Line: 12
Function: library

File: /home/u8613374/public_html/dasar/dev/application/core/frontend_controller.php
Line: 7
Function: __construct

File: /home/u8613374/public_html/dasar/dev/application/controllers/Artikel.php
Line: 7
Function: __construct

File: /home/u8613374/public_html/dasar/index.php
Line: 335
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: session_set_cookie_params(): Cannot change session cookie parameters when session is active

Filename: Session/Session.php

Line Number: 294

Backtrace:

File: /home/u8613374/public_html/dasar/dev/application/core/MY_Controller.php
Line: 12
Function: library

File: /home/u8613374/public_html/dasar/dev/application/core/frontend_controller.php
Line: 7
Function: __construct

File: /home/u8613374/public_html/dasar/dev/application/controllers/Artikel.php
Line: 7
Function: __construct

File: /home/u8613374/public_html/dasar/index.php
Line: 335
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): A session is active. You cannot change the session module's ini settings at this time

Filename: Session/Session.php

Line Number: 304

Backtrace:

File: /home/u8613374/public_html/dasar/dev/application/core/MY_Controller.php
Line: 12
Function: library

File: /home/u8613374/public_html/dasar/dev/application/core/frontend_controller.php
Line: 7
Function: __construct

File: /home/u8613374/public_html/dasar/dev/application/controllers/Artikel.php
Line: 7
Function: __construct

File: /home/u8613374/public_html/dasar/index.php
Line: 335
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): A session is active. You cannot change the session module's ini settings at this time

Filename: Session/Session.php

Line Number: 375

Backtrace:

File: /home/u8613374/public_html/dasar/dev/application/core/MY_Controller.php
Line: 12
Function: library

File: /home/u8613374/public_html/dasar/dev/application/core/frontend_controller.php
Line: 7
Function: __construct

File: /home/u8613374/public_html/dasar/dev/application/controllers/Artikel.php
Line: 7
Function: __construct

File: /home/u8613374/public_html/dasar/index.php
Line: 335
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: session_set_save_handler(): Cannot change save handler when session is active

Filename: Session/Session.php

Line Number: 110

Backtrace:

File: /home/u8613374/public_html/dasar/dev/application/core/MY_Controller.php
Line: 12
Function: library

File: /home/u8613374/public_html/dasar/dev/application/core/frontend_controller.php
Line: 7
Function: __construct

File: /home/u8613374/public_html/dasar/dev/application/controllers/Artikel.php
Line: 7
Function: __construct

File: /home/u8613374/public_html/dasar/index.php
Line: 335
Function: require_once


Syntax CSS

0 BYAdmin

Syntax dalam CSS terbagi menjadi tiga bagian: selector, property, dan nilai (value). Apabila kita perhatikan, bentuknya kurang lebih seperti ini :

    selector {
        property: value;
        property: value;
        property: value;
        property: value;
    } 

Selector ini digunakan dalam proses pertama dalam pemberian style nantinya, selector itu bisa berupa elemen HTML, atribut class maupun atribut ID yang ada dalam elemen HTML. ID dan Class selector ini kita yang tentukan. Jadi pertama selectornya dipanggil terlebih dahulu, baru kita berikan style, property dan valuenya. Kita akan belajar lebih jelasnya nanti. Sedangkan property adalah atribut yang akan diubah, dan tiap property dapat memiliki nilai. Property dan nilainya dipisahkan tanda titik-dua, dan ditulis diantara tanda kurung kurawal:

Perhatikan setiap property diberikan tanda ':' untuk nantinya bisa diisi nilainya, setiap nilai di akhiri dengan tanda ';'. Untuk lebih jelasnya kita bisa langsung praktek.

Sebagai contohnya kita akan mengganti background dari halaman HTML. Misalnya menjadi hitam. Elemen html yang akan kita rubah adalah elemen body, sedangkan setiap teks / tulisan warnanya putih. Kurang lebih kode CSS nya nanti seperti ini. Diletakkan dalam file tersendiri yakni style.css

    body {
        background: black;
        color: white;
    } 

Anda perhatikan body adalah selector yang dipanggil, selectornya berupa elemen body HTML. Dan di dalam kurung kurawal terdapat background yakni property dan black adalah value nya. Begitu juga dengan color adalah property sedangkan white adalah value nya. Nilainya. Jadi dalam bahasa Indonesia jika diartikan kurang lebih seperti ini : "Berikan style untuk body, warna backgroundnya hitam, dan warna teks tulisan nya putih"

Sedangkan kode html kurang lebih seperti ini nantinya :

    <html>
        <head>
        <title>Judul Halaman</title>
        <link rel="stylesheet" href="style.css" type="text/css"></link>
        </head>
        <body>
            <p>Ini adalah teks dalam background hitam</p>
        </body>
    </html>

Hasilnya nanti akan seperti ini :

See the Pen Contoh Penulisan Syntax CSS by Ilmuwebsite (@ilmuwebsite) on CodePen.

Bagaimana? Jelas sekali bukan?