Social Icons

twitterfacebookgoogle plusmyspacerss feedemail

Jumaat, 5 Mac 2010

HTML dan XHTML - Apa bezanya??

Salam~
Lama jugak penulis tidak membicarakan tentang Ilmu...
Mungkin disebabkan kekeringan idea...
Penulis tak dapat nak menulis post berkaitan ilmu...
Jadi kali ini penulis nak kongsikan berkenaan HTML dan XHTML...

Mula2 sekali...
Apa itu HTML dan apa pulak XHTML??
HTML merupakan singkatan daripada HyperText Markup Language...
Manakala XHTML pula eXtensible HyperText Markup Language...
Kedua - duanya adalah bahasa yang digunakan untuk membuat laman web...
Walaupun kebanyakkan laman web sekarang menggunakan flash...
Tapi HTML dan XHTML merupakan pilihan utama untuk membangunkan sebuah laman web...
Blog juga merupakan salah satu laman web...
Jadi penulis blog perlu tahu mengenai asas bahasa ini...

Mula - mula sekali mari kita tengok HTML dulu...
Mula diperkenalkan pada tahun 1991 oleh Tim Berners-Lee...
Tapi hanya beberapa syntax yang mudah saja wujud...
13 daripada semua elemen ini masih wujud dalam HTML versi terbaru iaitu 4.01...
Dan pada tahun 2006 bahasa baru iaitu XHTML versi 1.0 diperkenalkan...
Kat bawah nih ada senarai elemen yang wujud dan boleh digunakan dalam versi terbaru...


Syntax Description
<!--...--> Defines a comment
<!DOCTYPE>  Defines the document type
<a> Defines an anchor
<abbr> Defines an abbreviation
<acronym> Defines an acronym
<address> Defines contact information for the author/owner of a document
<area /> Defines an area inside an image-map
<b> Defines bold text
<base /> Defines a default address or a default target for all links on a page
<bdo> Defines the text direction
<big> Defines big text
<blockquote> Defines a long quotation
<body> Defines the document's body
<br /> Defines a single line break
<button> Defines a push button
<caption> Defines a table caption
<cite> Defines a citation
<code> Defines computer code text
<col /> Defines attribute values for one or more columns in a table
<colgroup> Defines a group of columns in a table for formatting
<dd> Defines a description of a term in a definition list
<del> Defines deleted text
<dfn> Defines a definition term
<div> Defines a section in a document
<dl> Defines a definition list
<dt> Defines a term (an item) in a definition list
<em> Defines emphasized text 
<fieldset> Defines a border around elements in a form
<font> Defines font, color, and size for text
<form> Defines an HTML form for user input
<h1> to <h6> Defines HTML headings
<head> Defines information about the document
<hr /> Defines a horizontal line
<html> Defines an HTML document
<i&gt; Defines italic text
<img /> Defines an image
<input /> Defines an input control
<ins> Defines inserted text
<kbd> Defines keyboard text
<label> Defines a label for an input element
<legend> Defines a caption for a fieldset element
<li> Defines a list item
<link /> Defines the relationship between a document and an external resource
<map> Defines an image-map 
<meta /> Defines metadata about an HTML document
<noframes> Defines an alternate content for users that do not support frames
<noscript> Defines an alternate content for users that do not support
client-side scripts
<object> Defines an embedded object
<ol> Defines an ordered list
<optgroup> Defines a group of related options in a select list
<option> Defines an option in a select list
<p> Defines a paragraph
<param /> Defines a parameter for an object
<pre> Defines preformatted text
<q> Defines a short quotation
<s> Deprecated. Defines strikethrough text
<samp> Defines sample computer code
<script> Defines a client-side script
<select> Defines a select list (drop-down list)
<small> Defines small text
<span> Defines a section in a document
<strike> Deprecated. Defines strikethrough text
<strong> Defines strong text
<style> Defines style information for a document
<sub> Defines subscripted text
<sup> Defines superscripted text
<table> Defines a table
<tbody> Groups the body content in a table
<td> Defines a cell in a table
<textarea> Defines a multi-line text input control
<tfoot> Groups the footer content in a table
<th> Defines a header cell in a table
<thead> Groups the header content in a table
<title> Defines the title of a document
<tr> Defines a row in a table
<tt> Defines teletype text
<u> Defines underlined text
<ul> Defines an unordered list
<var> Defines a variable part of a text

Ok...
Apa beza antara HTML ngan XHTML sebenarnya nih...
Sama saja kan syntax yang digunakan...
Kat bawah nih ada perbezaannya...

  1. Syntax mesti huruf kecil

  2. Diterima dalam HTMLXHTML
    <TITLE>MANMA Site</TITLE><title>MANMA Site</title>


  3. Variable yang digunakan dalam syntax mesti dalam pembuka dan penutup kata

  4. Diterima dalam HTMLXHTML
    <div id=header-wrapper><div id='header-wrapper'>


  5. Setiap elemen mesti sentiasa ditutup

  6. Diterima dalam HTMLXHTML
    <p>A paragraph.<p>A paragraph.</p>

    Contoh elemen lain yang perlu ditutup.
    <ul>...</ul>
    <li>...</li>
    <table>...</table>
    <h2>...</h2>
    <div>...</div>
    <span>...</span>
    <dt>...</dt>
    <dd>...</dd>
    <a  href>...</a>

    Untuk elemen yang tidak mempunyai pasangan. Cara untuk menutupnya adalah seperti dibawah.
    <br />
    <img />
    <input />
    <frame />
    <hr />
    <meta />
    <link />

  7. Element mesti ditutup dengan betul

  8. Diterima dalam HTMLXHTML
    <form><table>...</form></table><form><table>...</table></form>


  9. Setiap dokumen mesti ada hanya satu element utama

  10. <html>
    <head>...</head>
    <body>...</body>
    </html>
Setakat inilah serba sedikit tentang perbezaan HTML dan XHTML...
Kalau ada salah dan silap...
Tolong betulkan...

Suka Artikel ini? :

Ikut MANMA Site di facebook :

5 ulasan:

  1. How come you consider some females look for out relationships
    with men in jail, a great deal of them imprisoned for daily life?
    Brutal serial killers just like the Night Stalker have experienced females seek out him out for any connection and
    attainable relationship. Why do some girls do this?
    Can it be since they believe they're going to be necessary within a drastic way by an imprisoned man, a lot more than the usual free man?

    My blog post attracting women

    BalasPadam
  2. Hi, everything is going fine here and ofcourse every one is sharing data,
    that's actually excellent, keep up writing.

    Feel free to surf to my weblog :: basyx by hon vl701

    BalasPadam
  3. Thanks, thanks, thanks.. . Just because of academics using the
    transforming suggestions of reaching to? the
    world with cost-free training. You happen to be changing the world and I see
    it. . . Many thanks again.

    my website: 60 minute stamina free torrent download

    BalasPadam
  4. When someone writes an paragraph he/she maintains the thought of a
    user in his/her mind that how a user can know it. Therefore that's why this paragraph is great. Thanks!

    Feel free to surf to my site :: squirting mastery login **

    BalasPadam
  5. It's true,coconut water aids not to feel hungry for a long time. If I wish to eat something sweet or unwanted fat and I'm on the diet regime, I just either consume apple or
    consume a glass of coco juice, and that i never feel hungry
    to get a whilst later on. That is stunning getting under consideration that
    it contains only forty six energy.

    My homepage ... trudie styler weight loss yoga

    BalasPadam

 
Kembali ke Atas | Orang Sedang Membaca Disokong oleh | Dibina dan dikemaskini oleh "MANMA™ Site"
Kualiti terbaik menggunakan atau atau pada resolusi 1024x768 atau lebih