ENع
الدرس 11 · How browsers use HTML

From HTML to the DOM tree

لم يُترجم بعد؛ يُعرض باللغة الإنجليزية

A browser never draws your HTML file directly. It first turns the file's bytes into characters, the characters into tokens, and the tokens into a tree of objects in memory: the DOM. Follow a five-line file through the real parsing rules of the HTML standard and watch the stack of open elements push and pop as the tree grows. On the way, the parser adds the html, head and body elements the file left out and closes a paragraph it left open. Then a line of JavaScript changes the tree while the file stays the same.

12 دقيقة11 خطوات5 أسئلةAdvanced
شكل 11 · تفاعلي
جارٍ تحميل الرسم…
أو ← →

اختبار يتاح بعد الخطوة الأخيرة.