BOOK
Sabtu, 09 Mei 2015
Atribut CSS
| font-family | Semua jenis huruf (verdana, arial, Courier dll.) | Untuk menentukan jenis huruf |
| font-size | 8px, 9px, 10px dan seterusnya | Untuk mengatur ukuran huruf |
| font-variant | Small-caps, Normal-caps | Untuk membuat huruf menjadi KAPITAL |
| font-weight | Normal, Bold, Bolder, Lighter | Untuk membuat huruf tebal |
| text-decoration | - none - underline - overline - line-through | - tidak ada style - garis bawah - garis diatas text - garis ditengah text |
| text-align | left, center, right | Untuk mengatur letak text |
| font-style | Normal, italic | Gaya huruf |
| margin-left margin-top margin-bottom margin-right | Angka (dalam cm) | Batas kiri halaman Batas atas halaman Batas bawah halaman Batas kanan halaman |
Belajar CSS 4
<html>
<head>
<title>CSS 4</title>
<style type="text/css">
body{font-family: verdana; font-size: 12px}
a{color: red; text-decoration: none}
a:hover{color: white; background-color: red; font-weight: bolder}
</style>
</head>
<body>
<p>CSS dengan link.</p>
<p><a href="#">Alamat 1</a></p>
<p><a href="#">Alamat 2</a></p>
</body>
</html>
<head>
<title>CSS 4</title>
<style type="text/css">
body{font-family: verdana; font-size: 12px}
a{color: red; text-decoration: none}
a:hover{color: white; background-color: red; font-weight: bolder}
</style>
</head>
<body>
<p>CSS dengan link.</p>
<p><a href="#">Alamat 1</a></p>
<p><a href="#">Alamat 2</a></p>
</body>
</html>
Belajar CSS 3
<html>
<head>
<title>CSS 3</title>
<style type="text/css">
body{font-family: verdana; font-size: 15px}
b,i,u{color: blue; font-family: arial}
</style>
</head>
<body>
<p>Pemberian nilai yang sama pada Bold, Italic, dan Underline</p>
<p><b>Ini huruf tebal</b></p>
<p><i>Ini huruf italic</b></p>
<p><u>Ini huruf underline</b></p>
</body>
</html>
<head>
<title>CSS 3</title>
<style type="text/css">
body{font-family: verdana; font-size: 15px}
b,i,u{color: blue; font-family: arial}
</style>
</head>
<body>
<p>Pemberian nilai yang sama pada Bold, Italic, dan Underline</p>
<p><b>Ini huruf tebal</b></p>
<p><i>Ini huruf italic</b></p>
<p><u>Ini huruf underline</b></p>
</body>
</html>
Belajar CSS Bagian 2
<html>
<head>
<title>CSS 2</title>
<style type="text/css">
body{background-color: #abcde1; font-family: verdana; font-size: 12px}
b{color: red}
u{color: white}
</style>
</head>
<body>
<p>Contoh penggunaan <b>Cascading Style Sheet(CSS)</b> berwarna merah</p>
<p>Contoh penggunaan <u>Cascading Style Sheet(CSS)</u> berwawrna putih</p>
</body>
</html>
<head>
<title>CSS 2</title>
<style type="text/css">
body{background-color: #abcde1; font-family: verdana; font-size: 12px}
b{color: red}
u{color: white}
</style>
</head>
<body>
<p>Contoh penggunaan <b>Cascading Style Sheet(CSS)</b> berwarna merah</p>
<p>Contoh penggunaan <u>Cascading Style Sheet(CSS)</u> berwawrna putih</p>
</body>
</html>
Belajar CSS Bagian 1
<html>
<head>
<title>CSS 1</title>
</head>
<body bgcolor="#abcde1">
<font face="verdana" size=”2”>
<p>Contoh penggunaan <b><font color="red">Cascading Style Sheet(CSS)</font></b> berwarna merah</p>
<p>Contoh penggunaan <b><font color="white">Cascading Style Sheet(CSS)</font></b> berwawrna putih</p>
</font>
</body>
</html>
<head>
<title>CSS 1</title>
</head>
<body bgcolor="#abcde1">
<font face="verdana" size=”2”>
<p>Contoh penggunaan <b><font color="red">Cascading Style Sheet(CSS)</font></b> berwarna merah</p>
<p>Contoh penggunaan <b><font color="white">Cascading Style Sheet(CSS)</font></b> berwawrna putih</p>
</font>
</body>
</html>
Penghitungan angka data dalam suatu array pemrograman java
import java.util.Scanner;
public class Latihan1 {
public static void main( String[] args ){
String nama[] = {"Data1", "Data2", "Data3", "Data1"};
Scanner inp = new Scanner(System.in);
System.out.print( "Masukan data yang di Cari : " );
String data = inp.next();
int n = 0;
for( int i=0; i<nama.length; i++ ){
if( !nama[i].equals(data) ){
continue; //melanjutkan ke langkah berikutnya
}
n++;
}
System.out.println("Jumlah data " + n + " dalam aray");
}
}
public class Latihan1 {
public static void main( String[] args ){
String nama[] = {"Data1", "Data2", "Data3", "Data1"};
Scanner inp = new Scanner(System.in);
System.out.print( "Masukan data yang di Cari : " );
String data = inp.next();
int n = 0;
for( int i=0; i<nama.length; i++ ){
if( !nama[i].equals(data) ){
continue; //melanjutkan ke langkah berikutnya
}
n++;
}
System.out.println("Jumlah data " + n + " dalam aray");
}
}
Perulangan do while di pemrograman java
import java.util.Scanner;
public class Latihan1 {
public static void main( String[] args ){
Scanner inp = new Scanner(System.in);
System.out.print( "Masukan Nilai : " );
int x = inp.nextInt();
int x = 0;
do
{
System.out.println(x);
x++;
}while (x<10);
}
}
public class Latihan1 {
public static void main( String[] args ){
Scanner inp = new Scanner(System.in);
System.out.print( "Masukan Nilai : " );
int x = inp.nextInt();
int x = 0;
do
{
System.out.println(x);
x++;
}while (x<10);
}
}
Langganan:
Komentar (Atom)