Comment text here/p>
Markup är en vacker sak, och det har verkligen förändrats genom åren. Vad som verkligen var HTML1, har verkligen utvecklats till ett fantastiskt semantiskt uppmärkningsspråk, som vi i stor utsträckning kan tacka W3C. Och vad vet du, den nästa sak att tacka dem för har hänt - HTML5.
Till skillnad från tidigare version av HTML, där koden var mestadels en begränsad struktur som bestämdes av hur du använde klass- och ID-elementen, försöker html5 verkligen ge mer struktur.
All layout kan skapas med semantiska taggar och element som bestämmer hur du ska strukturera, och, förmodligen viktigare, som hjälper dig att strukturera varje sida. Detta producerar kod som är mycket renare och läsligare än i tidigare versioner av HTML, och det är verkligen något helt fantastiskt. De nya taggarna kräver verkligen att du tänker på hur du strukturerar din sida, vilket gör att vi är ärliga - i slutändan är det en bra sak för oss webbdesigners och utvecklare.
Innan du förstår strukturen i HTML5 och hur du skapar och kodar en exempelmall som ska användas för dina projekt borde du vara medveten om hur det hände. Var medveten om att den nuvarande versionen av HTML5 inte har nått en version som W3C kan ringa slutligt från och med än, men det är ganska mycket att lära sig om och börja använda i din kod just nu. Här är vad W3C har att säga om denna fråga:
"Implementatörer bör vara medvetna om att denna specifikation inte är stabil. Implementörer som inte deltar i diskussionerna kommer sannolikt att hitta specifikationen som ändras under dem på oförenliga sätt. Leverantörer som är intresserade av att genomföra denna specifikation innan den slutligen når kandidatrekommendationsfasen bör ansluta sig till ovannämnda postlistor och delta i diskussioner .”
Men låt inte det skrämma dig. Det finns alltid människor ute och ständigt ser till att det inte blir förändrat från under oss alla. Så du kommer säkert att vara medveten om en sådan drastisk förändring verkligen inträffar. Tillbaka på ämnet är en av de viktigaste frågorna som folk har om HTML5 "
Det kom faktiskt från oss alla. Under 2005 genomförde Google en studie av över 3 miljarder webbplatser och fann att de vanligaste klasserna som användes i gemensamt markup var faktiskt vad du ser där på den sidan. Footer, meny, titel, liten, text, innehåll, rubrik och nav är alla bland toppen av popularitetsdiagrammet. Och i huvudsak är det hur W3C bestämde sig för vad man ska använda för de nya semantiska taggarna för HTML5. Nu när vi vet om det, låt oss dyka rätt in i vad dessa taggar är och de grundläggande grundläggande förändringarna i HTML5.
En doktyp är inte särskilt ett element i HTML, men det är en deceleration, och en som har blivit allt viktigare när tiden går vidare. Att använda en på rätt sätt kan hjälpa din webbläsare att förstå vilken typ av HTML det prövar att analysera så vi vill alltid använda lämpliga doktyp. Med all ärlighet kan du i nuvarande stund bara använda HTML5-doktypen för allt men - men låt oss också täcka några tidigare. Här är där vi har kommit så långt som enkelhet:
Ganska bra rätt? Du behöver inte behålla ett dokument för att kopiera och klistra in lite löjligt lång doktyp, eller ännu värre än, försök att komma ihåg de löjligt långa typerna av versioner förbi. För HTML5 måste du bara skriva . Ah, vilken lättnad.
Innan vi lämnar det här avsnittet, låt oss gå igenom några av de andra elementen som har blivit enklare. Rotenhet har förenklats, i stället för att behöva skriva något som:
Vi kan bara skriva:
De saker vi behöver kopiera och klistra in blir mindre och mindre i minuten. Till exempel, även i huvudelementet, gick vår karaktärskodning från saker som:
till den nyare versionen i HTML5:
Och slutligen har våra länkar tappat deras typattribut. Så till exempel, detta:
Blir detta:
Sektionselementet är i princip en generisk del av ett HTML-dokument. Mest typiskt är det emellertid en tematisk gruppering av innehåll - som kan ha en rubrik men inte kräver en.
En allmän tumregel för användning av rubrikrubriken använder den bara om den uttryckligen hänvisas till i dokumentets disposition. Om, i översikten, det fanns en "sektion" som du refererade till eller känner att allt innehåll i ett område är en "sektion" av sorter - så inkluderar faktiskt sektionstaggen. Om du vill använda den huvudsakligen för styling ändamål, men gör det inte . Använd istället en
"Nav" -elementet representerar alla delar av en sida som länkar till andra delar av den sidan eller andra sidor i webbplatskartan. När som helst du tänker på navigeringslänkar, borde du tänka "nav tag".
Navelementet är särskilt avsett för större navigeringsblock. Något stort element som länkar till andra delar av webbplatsens sida eller andra sidor på webbplatsen. Tänk på att en navigationssektion inte måste vara i form av en lista, om än det är ganska standard. Det kan vara i prosa, stycketiketter, eller så mycket som helst - så länge som det ursprungligen var lämpligt att vara i sådana taggar i första hand.
Artikelelementet representerar en fristående komposition i ett dokument, en sida eller någon annan webbplats. Den väldigt viktiga sak att tänka på med artikel taggar är att det vanligtvis är självständigt distribuerbart eller återanvändbart innehåll som normalt placeras i taggarna. Det kan vara ett foruminlägg, en tidning eller en tidningartikel, eller en blogginmatning, även kommentarer - så länge det är något självständigt innehållsinnehåll.
Artiklar kan hålla "avsnitt" s inuti dem, "huvud" sitter inuti dem, även "hgroup" s inuti dem. Men kom ihåg när och hur du använder det här elementet, eftersom det inte är så vanligt som vanligt
Låt oss hoppa till ett exempel. Låt oss säga att du har ett blogginlägg med några kommentarer. Det kan du göra så här i HTML5:
The Blog Entry Title
12/25/2045
Blog entry
...
Comments
Comment text here/p>
Another comment here
Bortsettningselementet representerar varje sektion på en sida som består av innehåll som är tangentiellt relaterat till innehållet kring bortsettningselementet. Det viktigaste att komma ihåg med den här taggen är att även om det är innehåll som är tangentiellt relaterat till innehållet runt sidotaggen, är det vanligtvis information eller innehåll som är åtskilda i egenskapen. Du brukar använda den i sidofält, eftersom de flesta sidfält är perfekta att vara helt inslagna i sidospår. Andra användningsområden kan innefatta drackkurser, bitar av reklam, grupper av navlänkar eller till och med adresser nära adressen till en plats i fråga.
För att komma in i mer detalj är det dock när som helst du känner att du behöver bokstavligen ta en sida och förklara, referera, nämna, fråga eller fråga något. Du kan till och med använda ett tilläggselement för en större del av en webbplats, till exempel en sidofält för Twitter eller Facebook eller slumpmässiga länkar. Du kan få den att vara en sida, använd sedan en rubrik och nav-sektion i den, till och med för att förstå vad som händer där. Du kan använda den i sidfoten av blogginlägg för att hänvisa till saker om dem, eller i stort sett var som helst det kan implementeras fullständigt.
Hgroup-elementet representerar rubriken i en sektion. Detta element används bäst för att gruppera en uppsättning h1-h6-element när rubriken har flera nivåer eller underrubriker - som exakt den artikel du läser. Detta skulle vara perfekt för en hgroup. Du kan också använda den för alternativa titlar eller tagglinjer.
W3C påminner oss om:
"I form av sammanfattningar av dokument, skisser och liknande definieras texten i hgroupelementen som texten för hgroupelementets högst rankade h1-h6-elementets efterföljare, om det finns några sådana element och den första element om det finns flera element med den rankningen. Om det inte finns några sådana element, är texten i hgroup-elementet den tomma strängen.
Andra användningar inkluderar till exempel områden i en blogg där du listar rubriken och undertexten för ditt blogginlägg. Du kan också använda den för boktitlar och beskrivningar, för att läsa läkare i ditt område och deras kompetensområden, eller till och med använda det för att hjälpa till att replikera funktionaliteten hos ett bord. Låt oss ta en titt på ett sådant exempel nu. På ett bord skulle vi ha:
Doctor Name:
Randy McDocterson
Doctor Specialty
Slapping People
Så där kan du tydligt se, i märket, att vi har en läkare som heter Randy McDoctoerson, vars specialitet slår folk. Nu är det lite konstigt, men hej - det blir poängen över.
Header-taggen representerar en grupp inledande eller navigationshjälpmedel på en webbplats eller delar av en webbplats. Så nu när den formella definitionen har fastställts, låt oss bryta ner den lite. Vi vet alla vad en rubrik är, men för att vara specifik innehåller den olika saker på toppen av de flesta sajter. Dessa rubriker inkluderar vanligtvis varumärkesavsnitt, uppmaning till åtgärdsposter och kanske viss navigering. Egentligen kan det användas som helst plats som du brukade skriva:
Observera: Den kan användas i någon sektions startområde, eftersom det inte behöver vara i toppen eller början av ditt HTML-dokument. Men det är där det oftast implementeras.
Footer-elementet representerar en sidfot för dess närmaste nästdelade föräldrasektion och innehåller vanligen information om dess föräldrasektion. Footer-taggen är väldigt lik topphuvudet, men för motsatt sida av en sida. Ofta ser du en sidfot av en sida som innehåller länkar igen som var i navigeringen, och kanske en logotyp eller andra sådana saker - ja, alla dessa kan nu vara inrymda i en
lorem
ipsum
Några text här.
The “address” tag The address element represents the contact information for its nearest article or body element. I think the example best describes this tag so let's dive right in. ../People/Raggett/">Dave Raggett , Arnaud Le Hors ,contact persons for the W3C HTML Activity I think that very aptly describes the address tag, but the W3C would also like to note that typically the address element would be included along with other information in a footer element. So, this would work specifically for the email or about.me link at bottoms of websites (near the copyright information particularly). You can house that in an address element like so: mailto: [email protected] ">John Smith . © copyright 2038 Example Corp. And that just about wraps up all the important elements and new tags for HTML5. Keep in mind though, that wasn't ALL the tags available, but it was some of the more important ones and particularly the ones we will be working with today. HTML5 Template So now that we have learned about HTML5, let's get into coding our own template. Let's start with an average document. Now let's add the stylesheet link, just for good practice, even though we may not use it. Now I think it'd be a good time to start setting up our body element with some structure for us to use on other projects. So with that in mind let's do: Now, as you can see, we have a bit of a place for our content to go. We have a few designated sections. We have a designated header, footer, and section element within the document – but now let's add a navigation element as well. style.css"> HTML5 Template Pretty standard template Home About HTML5
Arnaud Le Hors ,contact persons for the W3C HTML Activity I think that very aptly describes the address tag, but the W3C would also like to note that typically the address element would be included along with other information in a footer element. So, this would work specifically for the email or about.me link at bottoms of websites (near the copyright information particularly). You can house that in an address element like so: mailto: [email protected] ">John Smith . © copyright 2038 Example Corp. And that just about wraps up all the important elements and new tags for HTML5. Keep in mind though, that wasn't ALL the tags available, but it was some of the more important ones and particularly the ones we will be working with today. HTML5 Template So now that we have learned about HTML5, let's get into coding our own template. Let's start with an average document. Now let's add the stylesheet link, just for good practice, even though we may not use it. Now I think it'd be a good time to start setting up our body element with some structure for us to use on other projects. So with that in mind let's do: Now, as you can see, we have a bit of a place for our content to go. We have a few designated sections. We have a designated header, footer, and section element within the document – but now let's add a navigation element as well. style.css"> HTML5 Template Pretty standard template Home About HTML5
The “address” tag The address element represents the contact information for its nearest article or body element. I think the example best describes this tag so let's dive right in. ../People/Raggett/">Dave Raggett , Arnaud Le Hors ,contact persons for the W3C HTML Activity I think that very aptly describes the address tag, but the W3C would also like to note that typically the address element would be included along with other information in a footer element. So, this would work specifically for the email or about.me link at bottoms of websites (near the copyright information particularly). You can house that in an address element like so: mailto: [email protected] ">John Smith . © copyright 2038 Example Corp. And that just about wraps up all the important elements and new tags for HTML5. Keep in mind though, that wasn't ALL the tags available, but it was some of the more important ones and particularly the ones we will be working with today. HTML5 Template So now that we have learned about HTML5, let's get into coding our own template. Let's start with an average document. Now let's add the stylesheet link, just for good practice, even though we may not use it. Now I think it'd be a good time to start setting up our body element with some structure for us to use on other projects. So with that in mind let's do: Now, as you can see, we have a bit of a place for our content to go. We have a few designated sections. We have a designated header, footer, and section element within the document – but now let's add a navigation element as well. style.css"> HTML5 Template Pretty standard template Home About HTML5 The “address” tag The address element represents the contact information for its nearest article or body element. I think the example best describes this tag so let's dive right in. ../People/Raggett/">Dave Raggett , Arnaud Le Hors ,contact persons for the W3C HTML Activity I think that very aptly describes the address tag, but the W3C would also like to note that typically the address element would be included along with other information in a footer element. So, this would work specifically for the email or about.me link at bottoms of websites (near the copyright information particularly). You can house that in an address element like so: mailto: [email protected] ">John Smith . © copyright 2038 Example Corp. And that just about wraps up all the important elements and new tags for HTML5. Keep in mind though, that wasn't ALL the tags available, but it was some of the more important ones and particularly the ones we will be working with today. HTML5 Template So now that we have learned about HTML5, let's get into coding our own template. Let's start with an average document. Now let's add the stylesheet link, just for good practice, even though we may not use it. Now I think it'd be a good time to start setting up our body element with some structure for us to use on other projects. So with that in mind let's do: Now, as you can see, we have a bit of a place for our content to go. We have a few designated sections. We have a designated header, footer, and section element within the document – but now let's add a navigation element as well. style.css"> HTML5 Template Pretty standard template Home About HTML5
The “address” tag The address element represents the contact information for its nearest article or body element. I think the example best describes this tag so let's dive right in. ../People/Raggett/">Dave Raggett , Arnaud Le Hors ,contact persons for the W3C HTML Activity I think that very aptly describes the address tag, but the W3C would also like to note that typically the address element would be included along with other information in a footer element. So, this would work specifically for the email or about.me link at bottoms of websites (near the copyright information particularly). You can house that in an address element like so: mailto: [email protected] ">John Smith . © copyright 2038 Example Corp. And that just about wraps up all the important elements and new tags for HTML5. Keep in mind though, that wasn't ALL the tags available, but it was some of the more important ones and particularly the ones we will be working with today. HTML5 Template So now that we have learned about HTML5, let's get into coding our own template. Let's start with an average document. Now let's add the stylesheet link, just for good practice, even though we may not use it. Now I think it'd be a good time to start setting up our body element with some structure for us to use on other projects. So with that in mind let's do: Now, as you can see, we have a bit of a place for our content to go. We have a few designated sections. We have a designated header, footer, and section element within the document – but now let's add a navigation element as well. style.css"> HTML5 Template Pretty standard template Home About HTML5
The “address” tag The address element represents the contact information for its nearest article or body element. I think the example best describes this tag so let's dive right in. ../People/Raggett/">Dave Raggett , Arnaud Le Hors ,contact persons for the W3C HTML Activity I think that very aptly describes the address tag, but the W3C would also like to note that typically the address element would be included along with other information in a footer element. So, this would work specifically for the email or about.me link at bottoms of websites (near the copyright information particularly). You can house that in an address element like so: mailto: [email protected] ">John Smith . © copyright 2038 Example Corp. And that just about wraps up all the important elements and new tags for HTML5. Keep in mind though, that wasn't ALL the tags available, but it was some of the more important ones and particularly the ones we will be working with today. HTML5 Template So now that we have learned about HTML5, let's get into coding our own template. Let's start with an average document. Now let's add the stylesheet link, just for good practice, even though we may not use it. Now I think it'd be a good time to start setting up our body element with some structure for us to use on other projects. So with that in mind let's do: Now, as you can see, we have a bit of a place for our content to go. We have a few designated sections. We have a designated header, footer, and section element within the document – but now let's add a navigation element as well. style.css"> HTML5 Template Pretty standard template Home About HTML5
The “address” tag The address element represents the contact information for its nearest article or body element. I think the example best describes this tag so let's dive right in. ../People/Raggett/">Dave Raggett , Arnaud Le Hors ,contact persons for the W3C HTML Activity I think that very aptly describes the address tag, but the W3C would also like to note that typically the address element would be included along with other information in a footer element. So, this would work specifically for the email or about.me link at bottoms of websites (near the copyright information particularly). You can house that in an address element like so: mailto: [email protected] ">John Smith . © copyright 2038 Example Corp. And that just about wraps up all the important elements and new tags for HTML5. Keep in mind though, that wasn't ALL the tags available, but it was some of the more important ones and particularly the ones we will be working with today. HTML5 Template So now that we have learned about HTML5, let's get into coding our own template. Let's start with an average document. Now let's add the stylesheet link, just for good practice, even though we may not use it. Now I think it'd be a good time to start setting up our body element with some structure for us to use on other projects. So with that in mind let's do: Now, as you can see, we have a bit of a place for our content to go. We have a few designated sections. We have a designated header, footer, and section element within the document – but now let's add a navigation element as well. style.css"> HTML5 Template Pretty standard template Home About HTML5
The “address” tag The address element represents the contact information for its nearest article or body element. I think the example best describes this tag so let's dive right in. ../People/Raggett/">Dave Raggett , Arnaud Le Hors ,contact persons for the W3C HTML Activity I think that very aptly describes the address tag, but the W3C would also like to note that typically the address element would be included along with other information in a footer element. So, this would work specifically for the email or about.me link at bottoms of websites (near the copyright information particularly). You can house that in an address element like so: mailto: [email protected] ">John Smith . © copyright 2038 Example Corp. And that just about wraps up all the important elements and new tags for HTML5. Keep in mind though, that wasn't ALL the tags available, but it was some of the more important ones and particularly the ones we will be working with today. HTML5 Template So now that we have learned about HTML5, let's get into coding our own template. Let's start with an average document. Now let's add the stylesheet link, just for good practice, even though we may not use it. Now I think it'd be a good time to start setting up our body element with some structure for us to use on other projects. So with that in mind let's do: Now, as you can see, we have a bit of a place for our content to go. We have a few designated sections. We have a designated header, footer, and section element within the document – but now let's add a navigation element as well. style.css"> HTML5 Template Pretty standard template Home About HTML5
The “address” tag The address element represents the contact information for its nearest article or body element. I think the example best describes this tag so let's dive right in. ../People/Raggett/">Dave Raggett , Arnaud Le Hors ,contact persons for the W3C HTML Activity I think that very aptly describes the address tag, but the W3C would also like to note that typically the address element would be included along with other information in a footer element. So, this would work specifically for the email or about.me link at bottoms of websites (near the copyright information particularly). You can house that in an address element like so: mailto: [email protected] ">John Smith . © copyright 2038 Example Corp. And that just about wraps up all the important elements and new tags for HTML5. Keep in mind though, that wasn't ALL the tags available, but it was some of the more important ones and particularly the ones we will be working with today. HTML5 Template So now that we have learned about HTML5, let's get into coding our own template. Let's start with an average document. Now let's add the stylesheet link, just for good practice, even though we may not use it. Now I think it'd be a good time to start setting up our body element with some structure for us to use on other projects. So with that in mind let's do: Now, as you can see, we have a bit of a place for our content to go. We have a few designated sections. We have a designated header, footer, and section element within the document – but now let's add a navigation element as well. style.css"> HTML5 Template Pretty standard template Home About HTML5
HTML5 Template
The “address” tag The address element represents the contact information for its nearest article or body element. I think the example best describes this tag so let's dive right in. ../People/Raggett/">Dave Raggett , Arnaud Le Hors ,contact persons for the W3C HTML Activity I think that very aptly describes the address tag, but the W3C would also like to note that typically the address element would be included along with other information in a footer element. So, this would work specifically for the email or about.me link at bottoms of websites (near the copyright information particularly). You can house that in an address element like so: mailto: [email protected] ">John Smith . © copyright 2038 Example Corp. And that just about wraps up all the important elements and new tags for HTML5. Keep in mind though, that wasn't ALL the tags available, but it was some of the more important ones and particularly the ones we will be working with today. HTML5 Template So now that we have learned about HTML5, let's get into coding our own template. Let's start with an average document. Now let's add the stylesheet link, just for good practice, even though we may not use it. Now I think it'd be a good time to start setting up our body element with some structure for us to use on other projects. So with that in mind let's do: Now, as you can see, we have a bit of a place for our content to go. We have a few designated sections. We have a designated header, footer, and section element within the document – but now let's add a navigation element as well. style.css"> HTML5 Template Pretty standard template Home About HTML5
HTML5 Template
The “address” tag The address element represents the contact information for its nearest article or body element. I think the example best describes this tag so let's dive right in. ../People/Raggett/">Dave Raggett , Arnaud Le Hors ,contact persons for the W3C HTML Activity I think that very aptly describes the address tag, but the W3C would also like to note that typically the address element would be included along with other information in a footer element. So, this would work specifically for the email or about.me link at bottoms of websites (near the copyright information particularly). You can house that in an address element like so: mailto: [email protected] ">John Smith . © copyright 2038 Example Corp. And that just about wraps up all the important elements and new tags for HTML5. Keep in mind though, that wasn't ALL the tags available, but it was some of the more important ones and particularly the ones we will be working with today. HTML5 Template So now that we have learned about HTML5, let's get into coding our own template. Let's start with an average document. Now let's add the stylesheet link, just for good practice, even though we may not use it. Now I think it'd be a good time to start setting up our body element with some structure for us to use on other projects. So with that in mind let's do: Now, as you can see, we have a bit of a place for our content to go. We have a few designated sections. We have a designated header, footer, and section element within the document – but now let's add a navigation element as well. style.css"> HTML5 Template Pretty standard template Home About HTML5
HTML5 Template The “address” tag The address element represents the contact information for its nearest article or body element. I think the example best describes this tag so let's dive right in. ../People/Raggett/">Dave Raggett , Arnaud Le Hors ,contact persons for the W3C HTML Activity I think that very aptly describes the address tag, but the W3C would also like to note that typically the address element would be included along with other information in a footer element. So, this would work specifically for the email or about.me link at bottoms of websites (near the copyright information particularly). You can house that in an address element like so: mailto: [email protected] ">John Smith . © copyright 2038 Example Corp. And that just about wraps up all the important elements and new tags for HTML5. Keep in mind though, that wasn't ALL the tags available, but it was some of the more important ones and particularly the ones we will be working with today. HTML5 Template So now that we have learned about HTML5, let's get into coding our own template. Let's start with an average document. Now let's add the stylesheet link, just for good practice, even though we may not use it. Now I think it'd be a good time to start setting up our body element with some structure for us to use on other projects. So with that in mind let's do: Now, as you can see, we have a bit of a place for our content to go. We have a few designated sections. We have a designated header, footer, and section element within the document – but now let's add a navigation element as well. style.css"> HTML5 Template Pretty standard template Home About HTML5
HTML5 Template Arnaud Le Hors ,contact persons for the W3C HTML Activity I think that very aptly describes the address tag, but the W3C would also like to note that typically the address element would be included along with other information in a footer element. So, this would work specifically for the email or about.me link at bottoms of websites (near the copyright information particularly). You can house that in an address element like so: mailto: [email protected] ">John Smith . © copyright 2038 Example Corp. And that just about wraps up all the important elements and new tags for HTML5. Keep in mind though, that wasn't ALL the tags available, but it was some of the more important ones and particularly the ones we will be working with today. HTML5 Template So now that we have learned about HTML5, let's get into coding our own template. Let's start with an average document. Now let's add the stylesheet link, just for good practice, even though we may not use it. Now I think it'd be a good time to start setting up our body element with some structure for us to use on other projects. So with that in mind let's do: Now, as you can see, we have a bit of a place for our content to go. We have a few designated sections. We have a designated header, footer, and section element within the document – but now let's add a navigation element as well. style.css"> HTML5 Template Pretty standard template Home About HTML5The “address” tag The address element represents the contact information for its nearest article or body element. I think the example best describes this tag so let's dive right in. ../People/Raggett/">Dave Raggett , Arnaud Le Hors ,contact persons for the W3C HTML Activity I think that very aptly describes the address tag, but the W3C would also like to note that typically the address element would be included along with other information in a footer element. So, this would work specifically for the email or about.me link at bottoms of websites (near the copyright information particularly). You can house that in an address element like so: mailto: [email protected] ">John Smith . © copyright 2038 Example Corp. And that just about wraps up all the important elements and new tags for HTML5. Keep in mind though, that wasn't ALL the tags available, but it was some of the more important ones and particularly the ones we will be working with today. HTML5 Template So now that we have learned about HTML5, let's get into coding our own template. Let's start with an average document. Now let's add the stylesheet link, just for good practice, even though we may not use it. Now I think it'd be a good time to start setting up our body element with some structure for us to use on other projects. So with that in mind let's do: Now, as you can see, we have a bit of a place for our content to go. We have a few designated sections. We have a designated header, footer, and section element within the document – but now let's add a navigation element as well. style.css"> HTML5 Template Pretty standard template Home About HTML5
The “address” tag The address element represents the contact information for its nearest article or body element. I think the example best describes this tag so let's dive right in. ../People/Raggett/">Dave Raggett , Arnaud Le Hors ,contact persons for the W3C HTML Activity I think that very aptly describes the address tag, but the W3C would also like to note that typically the address element would be included along with other information in a footer element. So, this would work specifically for the email or about.me link at bottoms of websites (near the copyright information particularly). You can house that in an address element like so: mailto: [email protected] ">John Smith . © copyright 2038 Example Corp. And that just about wraps up all the important elements and new tags for HTML5. Keep in mind though, that wasn't ALL the tags available, but it was some of the more important ones and particularly the ones we will be working with today. HTML5 Template So now that we have learned about HTML5, let's get into coding our own template. Let's start with an average document. Now let's add the stylesheet link, just for good practice, even though we may not use it. Now I think it'd be a good time to start setting up our body element with some structure for us to use on other projects. So with that in mind let's do: Now, as you can see, we have a bit of a place for our content to go. We have a few designated sections. We have a designated header, footer, and section element within the document – but now let's add a navigation element as well. style.css"> HTML5 Template Pretty standard template Home About HTML5
Och där går vi, vi har lagt till en del navigering med en fin oorderad lista där i rubrikavsnittet. Men vänta en minut. Vad händer om du har en bra stor sidfot och vill ha samma navigatorelement i sidfoten också. Tja, låt oss lägga till det där också. Bortsett från den här gången kommer vi inte att använda
HTML5 Template Om HTML5Låt oss nu lägga till några bitar för IE, och andra sådana tekniska egenskaper.
HTML5 Template HTML5-mall
Ganska standardmall
Och där har vi det: en grundläggande men fullständig HTML5-mall!
Vilka är dina favorit nya CSS3-tekniker? Eller lite använda / lite kända CSS-tekniker? Låt oss veta i kommentarerna!