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


Block dan Inline HTML

0 BYAdmin

Baiklah kita masuk ke dalam pembelajaran Block dan Inline HTML. Keduanya betul-betul bermanfaat dan berpengaruh sekali dalam layout / interface halaman website. Dibagi menjadi dua yakni block dan inline.

Block Element

Sebagaimana artinya, block itu berarti setiap elemen yang digunakan dalam halaman HTML menghasilkan block, satu baris. Jika ada dua elemen block yang digunakan maka akan menghasilkan dua baris. Jika Anda pernah sebelumnya menggunakan heading atau paragraf, semakin banyak heading atau paragraf maka semakin banyak baris yang dimunculkan. Nah kurang lebih elemen block itu seperti itu fungsinya. Namun nantinya digunakan untuk layout / tampilan / interface dari halaman website. Baiklah kita langsung saja masuk ke dalam teknis praktiknya. 


<html>
    <head>
        <title>Belajar Block Element</title>  
    </head>
    <body>
        <div>Contoh penggunaan block element</div>
        <div>Contoh penggunaan block element ke 2</div>
        <div>Contoh penggunaan block element ke 3</div>
    </body>
</html>

See the Pen Contoh Block Element Div by Ilmuwebsite (@ilmuwebsite) on CodePen.

 

Tag <div> ini nantinya akan banyak digunakan sebagai pondasi dari layout halaman html. Kita akan banyak menggunakan div, ditambah atribut ID, Class, dan style. Yang mana kita semua akan belajar semuanya di latihan selanjutnya.

Tapi kita akan coba terlebih dahulu penggunaan atribut style yang biasanya di berikan kepada block element. Contohnya seperti ini


<html>
    <head>
        <title>Belajar Block Element</title>  
    </head>
    <body>
        <div style="background-color:blue;color:white;padding:20px;">Contoh Block Element yang diberikan Style</div>
    </body>
</html>

See the Pen Contoh Block Element - Atribut Style by Ilmuwebsite (@ilmuwebsite) on CodePen.

 

Inline Element

Sebelumnya kita telah belajar mengenai Block Element. Saat ini kita akan belajar mengenai inline element. Kebalikan dari block element. Jika Block element apabila digunakan dua kali akan menghasilkan baris yang berbeda, maka inline element apabila digunakan berkali-kali pun masih ada dalam satu barisan yang sama.

Apa saja yang termasuk inline element? Salah satunya adalah <span>. Biasanya tag <span> ini lumrah digunakan di dalam tag yang lainnya misalnya tag heading <h1>. Contohnya adalah sebagai berikut.


<html>
    <head>
        <title>Belajar Inline Element</title>  
    </head>
    <body>
    <h1>Ini Contoh Penggunaan <span style="color:blue; font-weight:bold">Inline Element</span> Dalam Tag Heading</h1>
    </body>
</html>

See the Pen Belajar Inline Element by Ilmuwebsite (@ilmuwebsite) on CodePen.

 

Selain span, ada juga tag lain yang termasuk ke dalam inline element. Diantaranya : <a>, <abbr>, <acronym>, <b>, <bdo>, <big>, <br>, <button>, <cite>, <code>, <dfn>, <em>, <i>, <img>, <input>, <kbd>, <label>, <map>, <object>, <q>, <samp>, <script>, <select>, <small>, <span>, <strong>, <sub>, <sup>, <textarea>, <time>, <tt>, <var>

Untuk implementasi penggunaannya kita akan pelajari sambil studi kasus kedepannya