Hai - hai apa kabar, sudah lama sekali admin tidak update posting website ini. Sekarang admin mencoba kembali untuk rutin update posting serta berbagi ilmu dengan kalian.
Bagi teman-teman yang sedang mengambil mata kuliah Pemrograman Web, mungkin project ini akan berguna sekali untuk kalian. Project ini masih belum sempurna dan masih cukup banyak kekurangannya namun masih bisa kalian gunakan sebagai pedoman untuk membuat sistem website lengkap dengan fitur loginnya.
Fitur Project Web perpustakaan :
- Mysql, Jquery, CSS, Bootstrap, Javascript, JSON, AJAX
- Login with session (admin/user)
- Register as admin/user
- Admin page & member page
- Member page (borrow book, returning book, give review to book)
- Admin page (add new book, delete book, view borrowing history)
- Database MySQL
Oh iya untuk catatan kalian, agar project ini berjalan lancar kalian perlu mengaktifkan XAMPP dan membuat databasenya terlebih dahulu.
Untuk syntax database sudah admin lampirkan didalam GitLab dan tinggal kalian import saja. Project ini bersifat open source jadi kalian bebas untuk melakukan modifikasi tanpa ada copyright dari kami.
Mungkin itu saja yang dapat admin berikan kali ini, semoga bermanfaat dan semoga tugasnya terbantu. Jika ada yang ingin ditanyakan bisa menghubungi kontak yang tersedia atau memberikan komentar dibawah ini(slow respon).
Project Web Sistem Perpustakaan Lengkap Dengan Fitur - Fiturnya
Posted by RZDev: Belajar Programming! on Tuesday, July 10, 2018
Untuk membuat sistem login dengan multi level user, pertama - tama kita harus membuat database SQL nya.
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 05, 2018 at 06:30 AM
-- Server version: 10.1.25-MariaDB
-- PHP Version: 5.6.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `final`
--
-- --------------------------------------------------------
--
-- Table structure for table `pengguna`
--
CREATE TABLE `pengguna` (
`id_pengguna` int(4) NOT NULL,
`username` varchar(50) NOT NULL,
`password` varchar(50) NOT NULL,
`peran` varchar(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `pengguna`
--
INSERT INTO `pengguna` (`id_pengguna`, `username`, `password`, `peran`) VALUES
(1, 'admin', '21232f297a57a5a743894a0e4a801fc3', 'admin'),
(2, 'rezkycpp', '2c7ef4281d0d5aaf23b436d3fb36ff0f', 'member');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `pengguna`
--
ALTER TABLE `pengguna`
ADD PRIMARY KEY (`id_pengguna`),
ADD UNIQUE KEY `username` (`username`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `pengguna`
--
ALTER TABLE `pengguna`
MODIFY `id_pengguna` int(4) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 05, 2018 at 06:30 AM
-- Server version: 10.1.25-MariaDB
-- PHP Version: 5.6.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `final`
--
-- --------------------------------------------------------
--
-- Table structure for table `pengguna`
--
CREATE TABLE `pengguna` (
`id_pengguna` int(4) NOT NULL,
`username` varchar(50) NOT NULL,
`password` varchar(50) NOT NULL,
`peran` varchar(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `pengguna`
--
INSERT INTO `pengguna` (`id_pengguna`, `username`, `password`, `peran`) VALUES
(1, 'admin', '21232f297a57a5a743894a0e4a801fc3', 'admin'),
(2, 'rezkycpp', '2c7ef4281d0d5aaf23b436d3fb36ff0f', 'member');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `pengguna`
--
ALTER TABLE `pengguna`
ADD PRIMARY KEY (`id_pengguna`),
ADD UNIQUE KEY `username` (`username`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `pengguna`
--
ALTER TABLE `pengguna`
MODIFY `id_pengguna` int(4) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
Setelah database dibuat selanjutnya kita membuat connection.php untuk menghubungkan database tadi dengan page loginnya.
<?php
$servername = "localhost";
$username = "root";
$password = "";
$db = "final";
$conn = new mysqli($servername, $username, $password, $db);
if ($conn->connect_error) {
die("Database belum terhubung : " . $conn->connect_error);
}
?>
$servername = "localhost";
$username = "root";
$password = "";
$db = "final";
$conn = new mysqli($servername, $username, $password, $db);
if ($conn->connect_error) {
die("Database belum terhubung : " . $conn->connect_error);
}
?>
Untuk servername bisa kalian isi sesuaikan, begitu pula username dan passwordnya, dan juga nama databasenya bisa kalian sesuaikan sendiri dan save dengan nama connection.php.
Berikutnya kita membuat Session Loginnya.
<?php
$error='';
include "config.php";
if(isset($_POST['submit']))
{
$username = $_POST['username'];
$password = md5($_POST['password']);
$query = mysqli_query($conn, "SELECT * FROM pengguna WHERE username='$username' AND password='$password'");
if(mysqli_num_rows($query) == 0)
{
$error = "Username or Password is invalid!";
}
else
{
$row = mysqli_fetch_assoc($query);
$_SESSION['username'] = $row['username'];
$_SESSION['peran'] = $row['peran'];
$_SESSION['id_pengguna']= $row['id_pengguna'];
if($row['peran'] == "admin")
{
header("Location: admin/index.php");
}
else if($row['peran'] == "member")
{
header("Location: member/index.php");
}
else
{
$error = "Failed Login, check again!";
}
}
}
?>
$error='';
include "config.php";
if(isset($_POST['submit']))
{
$username = $_POST['username'];
$password = md5($_POST['password']);
$query = mysqli_query($conn, "SELECT * FROM pengguna WHERE username='$username' AND password='$password'");
if(mysqli_num_rows($query) == 0)
{
$error = "Username or Password is invalid!";
}
else
{
$row = mysqli_fetch_assoc($query);
$_SESSION['username'] = $row['username'];
$_SESSION['peran'] = $row['peran'];
$_SESSION['id_pengguna']= $row['id_pengguna'];
if($row['peran'] == "admin")
{
header("Location: admin/index.php");
}
else if($row['peran'] == "member")
{
header("Location: member/index.php");
}
else
{
$error = "Failed Login, check again!";
}
}
}
?>
Save dengan nama login.php, jika sudah lanjut kita akan membuat indexnya atau tampilan dari loginnya.
<?php
session_start();
if($_SESSION){
if($_SESSION['peran']=="admin")
{
header("Location: admin/index.php");
}
if($_SESSION['peran']=="member")
{
header("Location: member/index.php");
}
}
include('login.php');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>LOGIN PAGE</title>
<!-- Bootstrap -->
<link href="src/css/bootstrap.min.css" rel="stylesheet">
<link rel="icon" href="src/icon/favicon.ico">
<style>
body {
background-image: url(src/img/login.jpg);
background-position: center;
background-repeat: no-repeat;
}
.row {
margin: 100px auto;
width: 300px;
text-align: center;
}
.login {
background-color: #fff;
padding: 20px;
margin-top: 20px;
}
</style>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
<div class="row">
<div class="login">
<h2>Login first!</h2>
<?php
/*if(isset($_POST['login'])){
include("config.php");
$username = $_POST['username'];
$password = md5($_POST['password']);
$query = mysqli_query($conn, "SELECT * FROM pengguna WHERE username='$username' AND password='$password'");
if(mysqli_num_rows($query) == 0){
echo '<div class="alert alert-danger">Upss...!!! Login gagal.</div>';
}else{
$row = mysqli_fetch_assoc($query);
if($row['peran'] == 'admin' && $peran == 'admin'){
$_SESSION['username']=$username;
$_SESSION['peran']='admin';
header("Location: ../admin/index.php");
}else if($row['peran'] == 'member' && $peran == 'member'){
$_SESSION['username']=$username;
$_SESSION['peran']='member';
header("Location: ../member/index.php");
}else{
echo '<div class="alert alert-danger">Upss...!!! Login gagal.</div>';
}
}
}*/
?>
<form role="form" action="" method="post">
<div class="form-group">
<input type="text" name="username" class="form-control" id="username" placeholder="Username" required autofocus />
</div>
<div class="form-group">
<input type="password" name="password" class="form-control" id="password" placeholder="Password" required autofocus />
</div>
<!--
<div class="form-group">
<select name="peran" class="form-control" required>
<option value="">Pilih Level User</option>
<option value="admin">Admin</option>
<option value="member">Member</option>
</select>
</div>
-->
<div class="form-group">
<input type="submit" name="submit" class="btn btn-primary btn-block" value="Login" />
</div>
<div class="form-group">
<input type="button" name="register" class="btn btn-primary btn-block" value="Register" />
</div>
<?php echo $error; ?>
</form>
</div>
Copyright © Kelompok 7 - DPW
</div>
</div>
<script src="src/js/jquery-3.3.1.js"></script>
<script src="src/js/bootstrap.min.js"></script>
</body>
</html>
session_start();
if($_SESSION){
if($_SESSION['peran']=="admin")
{
header("Location: admin/index.php");
}
if($_SESSION['peran']=="member")
{
header("Location: member/index.php");
}
}
include('login.php');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>LOGIN PAGE</title>
<!-- Bootstrap -->
<link href="src/css/bootstrap.min.css" rel="stylesheet">
<link rel="icon" href="src/icon/favicon.ico">
<style>
body {
background-image: url(src/img/login.jpg);
background-position: center;
background-repeat: no-repeat;
}
.row {
margin: 100px auto;
width: 300px;
text-align: center;
}
.login {
background-color: #fff;
padding: 20px;
margin-top: 20px;
}
</style>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
<div class="row">
<div class="login">
<h2>Login first!</h2>
<?php
/*if(isset($_POST['login'])){
include("config.php");
$username = $_POST['username'];
$password = md5($_POST['password']);
$query = mysqli_query($conn, "SELECT * FROM pengguna WHERE username='$username' AND password='$password'");
if(mysqli_num_rows($query) == 0){
echo '<div class="alert alert-danger">Upss...!!! Login gagal.</div>';
}else{
$row = mysqli_fetch_assoc($query);
if($row['peran'] == 'admin' && $peran == 'admin'){
$_SESSION['username']=$username;
$_SESSION['peran']='admin';
header("Location: ../admin/index.php");
}else if($row['peran'] == 'member' && $peran == 'member'){
$_SESSION['username']=$username;
$_SESSION['peran']='member';
header("Location: ../member/index.php");
}else{
echo '<div class="alert alert-danger">Upss...!!! Login gagal.</div>';
}
}
}*/
?>
<form role="form" action="" method="post">
<div class="form-group">
<input type="text" name="username" class="form-control" id="username" placeholder="Username" required autofocus />
</div>
<div class="form-group">
<input type="password" name="password" class="form-control" id="password" placeholder="Password" required autofocus />
</div>
<!--
<div class="form-group">
<select name="peran" class="form-control" required>
<option value="">Pilih Level User</option>
<option value="admin">Admin</option>
<option value="member">Member</option>
</select>
</div>
-->
<div class="form-group">
<input type="submit" name="submit" class="btn btn-primary btn-block" value="Login" />
</div>
<div class="form-group">
<input type="button" name="register" class="btn btn-primary btn-block" value="Register" />
</div>
<?php echo $error; ?>
</form>
</div>
Copyright © Kelompok 7 - DPW
</div>
</div>
<script src="src/js/jquery-3.3.1.js"></script>
<script src="src/js/bootstrap.min.js"></script>
</body>
</html>
Kode diatas save dengan nama index.php dan jangan lupa saya disini menggunakan framework bootstrap kalian harus download sendiri ya.
Kemudian buat 2 folder baru admin dan user seperti gambar dibawah ini ...
Kemudian dimasing - masing folder kalian buat lagi 3 file yaitu index.php, config.php dan cek_admin.php / cek_user.php. Gunanya adalah agar ketika login sebagai admin kalian akan dilempar kedalam page khusus admin begitu pula jika kalian login sebagai user biasa kalian akan dilempar ke halaman user biasa.
config.php sama saja buat di folder user dan admin
<?php
$conn=mysqli_connect("localhost","root","","final")or die("Can't Connect...");
?>
$conn=mysqli_connect("localhost","root","","final")or die("Can't Connect...");
?>
cek_admin.php
<?php
session_start();
//cek apakah user sudah login
if(!isset($_SESSION['username'])){
die("Anda belum login");//
}
//cek level user
if($_SESSION['peran']!="admin")
{
die("Anda bukan admin");
}
?>
session_start();
//cek apakah user sudah login
if(!isset($_SESSION['username'])){
die("Anda belum login");//
}
//cek level user
if($_SESSION['peran']!="admin")
{
die("Anda bukan admin");
}
?>
cek_member.php
<?php
session_start();
//cek apakah user sudah login
if(!isset($_SESSION['username'])){
die("Anda belum login");//
}
//cek level user
if($_SESSION['peran']!="member")
{
die("Anda bukan member, reg first!");
}
?>
session_start();
//cek apakah user sudah login
if(!isset($_SESSION['username'])){
die("Anda belum login");//
}
//cek level user
if($_SESSION['peran']!="member")
{
die("Anda bukan member, reg first!");
}
?>
index.php untuk indexnya kalian bisa sesuaikan saja
<!DOCTYPE html>
<html>
<head>
<title>INI PAGE ADMIN/USER</title>
</head>
<body>
<p> SELAMAT DATANG ADMIN/USER </p>
</body>
</html>
<html>
<head>
<title>INI PAGE ADMIN/USER</title>
</head>
<body>
<p> SELAMAT DATANG ADMIN/USER </p>
</body>
</html>
Setelah semuanya selesai, coba jalankan dan coba login menggunakan kedua usernya yang sudah dibuat tadi...
Admin :
username : admin | password : admin
User :
username : rezkycpp | password : rezkycpp
Sekian dan terima kasih, semoga bermanfaat !!!
Membuat Sistem Login Multi Level User dengan PHP, Bootstrap dan Database MySQL
Posted by RZDev: Belajar Programming! on Monday, February 5, 2018
Selamat malam, sekarang kita akan belajar bagaimana cara membuat form di HTML 5, form kali ini hanya form dasar atau form yang sangat sederhana. Kalian dapat kembangkan lagi syntaxnya agar menjadi form yang lebih kompleks.
<!DOCTYPE html>
<html>
<head>
<meta charset = "utf-8">
<title>Form HTML 5</title>
</head>
<body>
<h1> Example Form</h1>
<p>Please fill out this form to help us improve our site.</p>
<form method = "post" action = "http://www.rezkycpp.com">
<input type = "hidden" name = "recipient" value = "www.rezkycpp.com">
<input type = "hidden" name = "subject" value = "FeedBack Form">
<input type = "hidden" name = "redirect" value = "index.html">
<p><label>Name:
<input name = "name" type = "text" size = "25" maxlength = "30">
</label></p>
<p>
<input type = "submit" value = "Submit">
<input type = "reset" value = "Clear">
</p>
</form>
</body>
</html>
<html>
<head>
<meta charset = "utf-8">
<title>Form HTML 5</title>
</head>
<body>
<h1> Example Form</h1>
<p>Please fill out this form to help us improve our site.</p>
<form method = "post" action = "http://www.rezkycpp.com">
<input type = "hidden" name = "recipient" value = "www.rezkycpp.com">
<input type = "hidden" name = "subject" value = "FeedBack Form">
<input type = "hidden" name = "redirect" value = "index.html">
<p><label>Name:
<input name = "name" type = "text" size = "25" maxlength = "30">
</label></p>
<p>
<input type = "submit" value = "Submit">
<input type = "reset" value = "Clear">
</p>
</form>
</body>
</html>
Nah itu tadi script untuk "cara membuat form sederhana di HTML 5", semoga dapat membantu tugasnya, sukses selalu!
Cara Mudah Membuat Form Sederhana di HTML 5
Posted by RZDev: Belajar Programming! on Monday, January 15, 2018
Berikut beberapa input type yang sering digunakan di HTML 5
Berikut syntaxnya, semoga bermanfaat dan lancar buat tugasnya
<!DOCTYPE html>
<!-- Fig. 3.1: newForminputtypes.html -->
<!-- Di ketik oleh rezkycpp -->
<html>
<head>
<meta charset="UTF-8">
<title>Latihan web desain</title>
</head>
<body>
<h1> New HTML5 Input types Demo</h1>
<p>This form demonstrates the new HTML5 input types and the placeholder, required and autofocus attributes
</p>
<form method="post" action="http://www.deitel.com">
<p>
<label>Color:
<input type = "color" autofocus />
(Hexadecimal code such as #ffffff)
</label>
</p>
<p>
<label>Date:
<input type ="date" />
(yyyy-mm-dd)
</label>
</p>
<p>
<label>Datetime-local:
<input type = "datetime-local"/>
(yyyy-mm-ddThh:mm+ff:gg, such as 2012-01-27T03:15)
</label>
</p>
<p>
<label>Email:
<input type ="email" placeholder ="nama@domain.com" required />
(nama@domain.com)
</label>
</p>
<p>
<label>Month:
<input type ="month" /> (yyyy-mm)
</label>
</p>
<p>
<label>Number:
<input type = "number"
sin ="0"
max ="7"
step="1"
value="4"/>
</label> (enter a number between 0 and 7)
</p>
<p>
<label>Range: 0
<input type = "range"
min = "0"
max = "20"
value = "10"/> 20
</label>
</p>
<p>
<label>Search:
<input type = "search" placeholder = "search query"/>
</label> (enter your search query here.
</p>
<p>
<label>Tel:
<input type = "tel" placeholder = "(###) ###-####" pattern = "\(\d{3}\)+\d{3}-\d{4}" required />
(###) ###-####
</label>
</p>
<p>
<label>Time:
<input type = "time" /> (hh:mm:ss.ff)
</label>
</p>
<p>
<label>URL:
<input type = "url" placeholder = "http://www.domainname.com" />
(http://www.domainname.com)
</label>
</p>
<p>
<label>Week:
<input type = "week" />
(yyyy-Wnn, such as 2012-W01)
</label>
</p>
<p>
<input type="submit" value="Submit" />
<input type="reset" value="Clear" />
</p>
</form>
</body>
</html>
<!-- Fig. 3.1: newForminputtypes.html -->
<!-- Di ketik oleh rezkycpp -->
<html>
<head>
<meta charset="UTF-8">
<title>Latihan web desain</title>
</head>
<body>
<h1> New HTML5 Input types Demo</h1>
<p>This form demonstrates the new HTML5 input types and the placeholder, required and autofocus attributes
</p>
<form method="post" action="http://www.deitel.com">
<p>
<label>Color:
<input type = "color" autofocus />
(Hexadecimal code such as #ffffff)
</label>
</p>
<p>
<label>Date:
<input type ="date" />
(yyyy-mm-dd)
</label>
</p>
<p>
<label>Datetime-local:
<input type = "datetime-local"/>
(yyyy-mm-ddThh:mm+ff:gg, such as 2012-01-27T03:15)
</label>
</p>
<p>
<label>Email:
<input type ="email" placeholder ="nama@domain.com" required />
(nama@domain.com)
</label>
</p>
<p>
<label>Month:
<input type ="month" /> (yyyy-mm)
</label>
</p>
<p>
<label>Number:
<input type = "number"
sin ="0"
max ="7"
step="1"
value="4"/>
</label> (enter a number between 0 and 7)
</p>
<p>
<label>Range: 0
<input type = "range"
min = "0"
max = "20"
value = "10"/> 20
</label>
</p>
<p>
<label>Search:
<input type = "search" placeholder = "search query"/>
</label> (enter your search query here.
</p>
<p>
<label>Tel:
<input type = "tel" placeholder = "(###) ###-####" pattern = "\(\d{3}\)+\d{3}-\d{4}" required />
(###) ###-####
</label>
</p>
<p>
<label>Time:
<input type = "time" /> (hh:mm:ss.ff)
</label>
</p>
<p>
<label>URL:
<input type = "url" placeholder = "http://www.domainname.com" />
(http://www.domainname.com)
</label>
</p>
<p>
<label>Week:
<input type = "week" />
(yyyy-Wnn, such as 2012-W01)
</label>
</p>
<p>
<input type="submit" value="Submit" />
<input type="reset" value="Clear" />
</p>
</form>
</body>
</html>
Berikut Beberapa Input Type yang ada di HTML 5
Posted by RZDev: Belajar Programming! on Saturday, January 13, 2018
Well, sekarang kita akan membahas struktur dasar dari HTML 5, HTML 5 sendiri merupakan perkembangan dari HTML, di HTML 5 kita dapat menambahkan fitur - fitur seperti SVG, canvas & grafik sedangkan di HTML terdahulu kita hanya dapat menambahkan fitur seperti itu melalui flash, vml, silver-light.
Struktur khas dari HTML 5 adalah <!DOCTYPE html>. Jadi sangat mudah untuk mengidentifikasi website yang menggunakan HTML 5 atau tidak.
Belajar HTML5, bagi teman - teman yang mengambil mata kuliah Desain dan Pemrograman Web pasti kalian akan menjumpai dan kenal dengan HTML5 atau hypertext markup language 5. HTML5 sendiri merupakan versi terbaru dari HTML dan merupakan bahasa pemrograman web. Hampir semua website yang kita kunjungi sudah menggunakan HTML5.
Apa perbedaan html dengan html5 ?
Sebenarnya lebih tepat jika disebut apa fitur apa saja yang ada di html, karena html dan html5 merupakan suatu bahasa yang sama namun di html5 sudah kembangan dan diperbarui. Untuk mengidentifikasi apakah suatu website menggunakan html5 sangatlah mudah, kita tinggal liat coding yang digunakan website tersebut jika ada syntax <!DOCTYPE html> maka dapat dipastikan website tersebut menggunakan html5.
Dalam html5 sendiri ada beberapan elemen tambahan yang tidak ada di html sebelumnya seperti :
- Semantic Elements [<header>, <footer>, <article>, <section>]
- Attributes of Form Elements [number, date, time, calendar, range]
- Graphics Elements [<svg> and <canvas>]
- Multimedia Elements [<audio> and <video>]
Dan API atau Application Programming Interfaces berupa :
- HTML SSE
- HTML Web Workers
- HTML Application Cache
- HTML Local Storage
- HTML Drag and Drop
- HTML Geolocation
Dan ada juga beberapa elemen yang dihapus di html5 ini seperti :
- <acronym>
- <applet>
- <basefont>
- <big>
- <center>
- <dir>
- <font>
- <frame>
- <frameset>
- <noframes>
- <strike>
- <tt>