Ko’pchiligimiz htmlni bilamiz deb o’ylaymiz. Bu no’tog’ri gap. Negaki htmlda 20ta tegni o’rgangan bilan htmlni bilamiz deyolmaymiz. vaholanki htmlda 100dan ortiq teg bor. Ushbu teglarni boshidan o’rgatshga qaror qildim. iltimos erinmasdan o’qib o’raningla. Bu o’zingiz uchun foydali. Endi esa mavzuga qaytamiz
Avval oddiy HTML 5 karkasni ko’ramiz
|
<!DOCTYPE html>
<html>
<head>
<title>!DOCTYPE</title>
<meta charset="utf-8">
</head>
<body>
<p>Men oddiy html 5 sahifaman. Eng birinchi qatorda Doctype yozilgan.</p>
</body>
</html>
|
DOCTYPE bu nima teg yoki shunchaki kod?
DOCTYPE bu htmlda teg hisoblanmaydi. Bu htmlda saytga dostup yani ruxsat berish uchun ishlatiladi ya’ni brauzerga HTML qaysi versiyada ekanini xabar beradi. Brauzer esa shunga qarab validatordan o’tkazadi. (validator haqida keyingi darslarda batafsil o’rganamiz.) Doctype har qaysi versiyadagi htmlda har xil. Yaxshilab o’rganing. savollar bo’lsa kommentaryga yozishingiz mumkin
HTML 4.01
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
|
HTML 5
XHTML 1.0
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
|
XHTML 1.1
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
manba:bats.uz
Комментариев нет:
Отправить комментарий