Penggunaan tag div dan span dalam halaman web

July 6, 2011

div digunakan untuk pembagian secara logikal dari struktur halaman web. span digunakan untuk mengidentifikasi teks di dalam tag div yang dapat diformat oleh CSS.

file 101.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

<html xmlns="">
		<link rel="stylesheet" type="text/css" href="/style.css" />
		<title>Penggunaan div dan span</title>
		<div id="page">
			<div id="main">
			<h1>Halaman Judul</h1>
			<p><span id="welcome">Selamat datang di Blog ThePetarung.</span>
			Mari belajar HTML, XHTML, dan CSS.</p>
		<div id="footer">
			<p>&copy; Copyright 2010 ThePetarung Blog.</p>

setelah jadi, maka hasilnya akan seperti ini:


2 Responses to “Penggunaan tag div dan span dalam halaman web”

  1. Aqiqah Says:

    Tremendous things here. I am very glad to look your post.
    Thank you a lot and I’m taking a look forward to contact you. Will you kindly drop me a mail?

  2. jersey bola Says:

    It’s in fact very complicated in this active life to listen news on Television, so I simply use web for that purpose, and get the hottest news.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: