Web Programming with html5, css, and JavaScript



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

HTML5 and CSS 
 Coding-Style 
Conventions
633
APPENDIX 
A


Files
1. HTML file names should end in 
.html
, not 
.htm
. Using the full HTML acronym is more 
descriptive.
W3C’s Validation Service
1. Validate every web page and every external style sheet by using the W3C’s validation 
services. The HTML and CSS validation services, respectively, are found here:
http://validator.w3.org/
http://jigsaw.w3.org/css-validator/
Comments
1. Short comments should be written on one line. Provide a space after the 
. Provide a 
space prior to the 
- — ->
. For example:
Park CS Department
2. Comments that require more than one line should use block-style indented text. For 
example:
The following section contains complex mathematical 
equations. Some of the equations contain errors. The point 
is to see how many visitors actually take the time to study 
the details. We'll count how many responses we get over the 
next three-month period.
-->
General
1. Provide end tags for all container-type elements. For example:
Park University, founded in 1625 by the Franciscan Monks, 
quickly became renowned for its efforts in the fields of 
alchemy and computer science.
2. Use lowercase characters for all tags and attributes.
3. Enclose all attribute values in double quotes.
634
Appendix A
 
HTML5 and CSS Coding-Style Conventions


4. Because the 
name
attribute can be used to identify elements in JavaScript, and JavaScript 
coding conventions suggest using camel case for multiword variable names, use camel 
case for values for the 
name
attribute.
5. Do not use spaces around the equals sign when specifying an attribute value pair. For 
example:

6. Blank lines:
• Insert a blank line between the 
head
and 
body
sections.
• Optionally, you may insert blank lines to separate two large logical chunks of code
(> 8 lines each?), but do not insert a blank line unless there’s a reason to do so.
7. Indentations:
You should use two spaces for your indentations. Do not use tabs.
8. For void elements, HTML5 allows you to insert a blank space and slash (
/
) at the left of 
the closing 
>
, like this:

However, you should have no blank space and no slash.

Download 18,68 Mb.

Do'stlaringiz bilan baham:
1   ...   88   89   90   91   92   93   94   95   ...   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