Cybershoutz

Diberdayakan oleh Blogger.

Resume Desain Web (pertemuan 9)

Cascading Style Sheet (CSS)


CSS Syntax

Ada tiga cara untuk menggunakan style pada halaman web. Penggunaan cara-cara tersebut tergantung kebutuhan halaman web. Tiga cara tersebut adalah :
1.   Linking.
yaitu menggunakan style sheet dengan cara membuat suatu link pada file dimana style tersebut berada.
2.   Embedding.
yaitu dengan meletakkan definisi style sheet di bagian atas sebelum dokumen sebelum bagian <body> .
3.   Import.
yaitu mengimport file yang berisi Style Sheet
Contoh embeded:
<html>
                <head>
                                <title>Langsung</title>
                                <style type="text/css">
#header{background-color:navy; border:1px solid blue; width:50%;}
                margin-left:auto; margin-right:auto; text-align:center;
                font-family:arial; color:white; padding-top: 17px; padding-bottom: 17px;}
hr{color:red;}
                                </style>
                </head>
                <body>
                <div id="header">
                                Saya Adalah Anak Gembala, Selalu Riang Serta Gembira
                </div>
                <hr />
                </body>

resume desain web (pertemuan 8)

Javascript

Scripting Loops
Dalam Javascript terdapat dua macam perulangan yaitu :
      - For : perulangan berdasar junlah yang ditentukan
      - While : perulangan selama suatu kondisi dinyatakan benar
 
Events

By using JavaScript, we have the ability to create dynamic web pages. Events are actions that can be detected by JavaScript.
Every element on a web page has certain events which can trigger a JavaScript. For example, we can use the onClick event of a button element to indicate that a function will run when a user clicks on the button. We define the events in the HTML tags.

Scripting Error Handling
When browsing Web pages on the internet, we all have seen a JavaScript alert box telling us there is a runtime error and asking "Do you wish to debug?". Error message like this may be useful for developers but not for users. When users see errors, they often leave the Web page.
The try...catch Statement
The try...catch statement allows you to test a block of code for errors. The try block contains the code to be run, and the catch block contains the code to be executed if an error occurs.



Facebook Twitter RSS