I-Goodbye Block & Inline - Siyakwamukela i-HTML5

Ubungcweti bokucaciswa kwe-HTML5 buningi futhi eziningi zazo sezivele zisekelwa yiningi lendawo yesiphequluli - ngezansi ngifuna ukugqamisa ushintsho oluhehayo emithethweni yezinto zokwakha izidleke. I-HTML ibilokhu ihlukanisa phakathi kwebhulokhi nezinto ezisemgqeni. Incazelo yohlobo lwedokhumenti ye-HTML4, ngokwesibonelo, amagama h1, p, ne-div njengezakhi zebhulokhi kanye ne-span, img njengezinto ezisemgqeni.


Lo mqondo manje ulahliwe (ngezizathu ezizwakalayo). Kwezinye izimo zokusebenzisa, abaklami abaningi bewebhu abawunakanga ukufaneleka kwalo mthetho wokufaka isidleke wokuthi azikho izinto ezivimbayo ezingaba ngaphakathi kwezinto ezisemgqeni, noma indlela yokuziphatha ejwayelekile esebenzisa imithetho ye-CSS efana ne- display: inline; noma ukubonisa: vimba; (okuvame ukuholela kwikhodi engavumelekile) ngaphandle kokunye ukwengeza.

I-HTML5 manje ithambisa lo mehluko futhi ibiza ngisho nezigaba ezi- 9 ezahlukahlukene into engaba kuzo, lapho into ingaba ngezigaba eziningana. Umehluko wakudala phakathi kwebhulokhi nezinto ezisemgqeni uphonswa olwandle futhi ubuningi bezincazelo zamathegi kuwebhu buyabhekwa. Ikakhulu, lokhu kunomphumela wokuthi lezi zakhi ezilandelayo zimelela ikhodi evumelekile:

<a href="#">
   <div>
      <h1>Yeah</h1>
      <p>
         Der ganze Block ist verlinkt.
      </p>
   </div>
</a>

Isiqukathi sonke esinezinto ezengeziwe zokuvimba ngaphambili sasikhona kuphela (ngekhodi evumelekile) kusetshenziswa ubuqili (ngokwesibonelo, ngokubeka ngokuphelele ungqimba lokumbondelana). Ngenye indlela, uxhumanise isihloko nesigaba - lokhu kuholele ekusetshenzisweni futhi isitsha asichofozeki. Ngokwengezwa okwamukelekayo ku-HTML5, lokhu akuseyona inkinga.

Emuva