نموذج ويب XHTML بسيط في تصميم الويب 5. التكنولوجيا 1: تسمية ساندويتش
قم بتضمين مربع الإدخال ، مربع التحديد ومربع النص في عنصر التسمية وقم بتعيين جميع العناصر على مستوى الكتلة. قم بتعيين أزرار الراديو وشاشة متعددة الفحص لتسهيل مظهرها على نفس الخط. إذا كنت تفضل ظهور أزرار التسمية والراديو/مربعات الفحص المتعددة على خطوط مختلفة ، فيمكنك اختيار عدم تضمينها في التسمية أو استخدام تغليف الخط الثابت.
يظهر كل موقف أدناه.
عندما تبدو هذه أكثر أناقة ، فإن W3C قد عرضت ضمنيًا أمثلة على الملصقات.
الفوائد الرئيسية : بسيطةشفرة:
التسمية ، الإدخال ، حدد ، textarea {display: block ؛} label {margin-bottom: 10px ؛} input [type = radio] ، input [type = checkbox] {display: inline ؛} <Porm> <fieldSet> <legend> contac size = 20 /> <label for = choices> choices (radio)-<em> ملصق ملفوف < /em> </blize> <input name = choice type = radio /> الاختيار 1 <input name = choice type = radio /> الاختيار 2 <input name = type = radio /> الاختيار 3 <style style = margin-bottom: 0pt ؛ بالنسبة إلى = choices2> الخيارات (مربع الاختيار)-<em> تسمية غير ملفوفة ، إعادة تعيين الهامش < /em> </sably> <input name = choice2 type = checkbox /> الاختيار 1 <input name = choice2 type = checkbox /> choice 2 <input name = choice2 type = checkbox /> choice 3 <div style: 10px ؛> <!- <em> ملفوف ، كسر السطر الثابت </em> </billy> <input name = choice3 type = checkbox/> الاختيار 1 <input name = choice3 type = checkbox/> choice 2 <input <Spoint> الخيار 3 </OPTION> </rection> <label for = message> message <textarea cols = 36 rows = 12 name = message> </textarea> </billy> <type type = president value = send it/> </fields> </poth>
نتائج التشغيل :#expamle1 label ،#expamle1 input ،#expamle1 select ،#expamle1 textarea {display: block ؛}
#expamle1 label {margin-bottom: 10px ؛}
#expamle1 input [type = "radio"] ،#expamle1 input [type = "checkbox"] {display: inline ؛}
التكنولوجيا 2: كسول
اعتمد العديد من المطورين هذه الطريقة غير التقليدية ولكنها سريعة وسهلة (مميزة بأقسام كسر الخط). على الرغم من أنه يمكن تشغيله ، إلا أنه ضار بقدرات CSS لأنك لا تحتاج إلى أي CSS لتنفيذها.
الفوائد الرئيسية : سريعشفرة:
<Porm> <FieldSet> <gend> نموذج جهة الاتصال < /legend> <label for = name> name < /label> <input id = name name = name size = 20 /> <label for = email> البريد الإلكتروني < /label> <input id = explice name = eild size = 20 /> <labil الاختيار 3 <Label for = choices3> الخيارات (مربع الاختيار) </label> <name input <Spoint> الخيار 3 </OPTION> </revels> <label for = message> message </bally> <textarea cols = 36 rows = 12 name = message> </swertarea> <input type = pridt value = send it/> </fieldset> </poth>
نتائج التشغيل : الصفحة السابقة 1 2 الصفحة التالية اقرأ النص الكامل