Web Programming with html5, css, and JavaScript



Download 18,68 Mb.
Pdf ko'rish
bet93/98
Sana28.10.2022
Hajmi18,68 Mb.
#857632
1   ...   90   91   92   93   94   95   96   97   98
Bog'liq
Web Programming with HTML5, CSS, and JavaScript

Avoid Long Lines
1. Long lines are bad because:
• Within an integrated development environment (IDE), it is annoying to have to scroll right 
in order to see the end of a line of code.
• If you paste your code to a word processing document, line wrap occurs, which leads to 
visual confusion.
• If you need to compare two files side-by-side on a computer screen, long lines make that 
difficult.
2. You should split up long lines by pressing 
Enter
at a natural breaking point(s). You 
may or may not want to indent on the continuation line—it’s a bit of a gray area. If 
the container represents something that’s supposed to look like a paragraph (e.g., 
p
or 
blockquote
), then do not indent. Otherwise indent. Examples will be provided in the 
upcoming sections.
Top of the Web Page
1. Include the following line at the top of your 
.html
 files:
This tells the browser to use the HTML5 version of HTML (because other versions of 
HTML use different forms of the doctype instruction).
635
Top of the Web Page


The W3C and the WHATWG say that tag names, attribute names, and the doctype 
instruction (doctype is not considered to be an element; it’s an instruction) are case 
insensitive. Google’s Style Guide says “All code has to be lowercase” except for when it’s 
appropriate for a value to use uppercase. Based on that, 
should be 
. However, the vast majority of examples on the W3C, WHATWG, and 
Google websites use uppercase for 
DOCTYPE
, so that’s what this document recommends. If 
you prefer all lowercase for the doctype instruction, you may use it if your boss or teacher 
approves.
head
 Container
The following items should be included in the order shown.
1. To avoid content being interpreted incorrectly, provide this 
charset
meta
element:

2. Provide an 
author meta
element. For example:

3. As an option, to help search engines find your pages, you may also want to provide 
description
and 
keywords
meta
elements. For example:
content="This web page presents Dean family highlights.">

In the first 
meta
element, note the indentation for the continuation line.
4. Provide a meaningful 
title
element on each page. For example:
Dean Family
5. For external CSS files, use the 
link
element. For example:


Download 18,68 Mb.

Do'stlaringiz bilan baham:
1   ...   90   91   92   93   94   95   96   97   98




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish