When we use the right tags in the right place, it results in a better page layout, better indexing by search engine and better user experience. We will use the following tags to get the job done:-
<header> → Contains nav tag
<main>
→ Website layout
<footer>
Inside the main tag we insert the following tags:
<main> → The main opening tag
< Section> → A page section
<article> → can have self-contained content.
<aside> → Content aside from the Content (e.g. Ads ck)
</main> → The main closing tag
Creating a page like this is not necessary but it creates a readable & structured layout- Also they are useful for Search Engine Optimization ( SEO ).
Link attributes
<a href=”/contact”> Contact us </a> Contact page opens in Same lab
<a href=”/ contact” target=”_blank”> Contact us </a> opens in a news tab
We can put any content inside an anchor tag (images, headings etc are all allowed)
If the page is inside a directory, we need to make sure that we link to the correct page.
↳ Same applies to ing tig as well
We can add links to images like this
<a href=”/ = “/about”> <img src=’a. Jpg” width=”120″ > </a>
↳ Height will be set automatically
The Div tag
div tag is often used as a container for other elements dis is a block level element.
↳ Always takes full width
The span tag Span is an inline Container.
↳ Takes as much width as necessary
<!– Block Elements –>
<address> <article><aside><blockquote> <canvas><dd><div><dl> <dt><fieldset> <figcaption> figure><footer><form> <h1>-<h6><header> <hr><li><main> <nav><noscript> <ol><p><pre> <sec on><table><tfoot><ul><video></video> –>
<!–Inline Elements –>
<abbr><acronym><b><bdo><big><br>
<button> <cite> <code><dfn><em><i><img><input><kbd> <label><map><object><output><q><samp><script><select><small><span><strong><sub><sup> <textarea><time> <tt><var> –>