Semantic Tags in HTML | Sigma Web Development Course - Tutorial #11

CodeWithHarry
6 Oct 202310:41

Summary

TLDRThis 11th installment of the Sigma Web Development course delves into the importance of Semantic Tags for SEO and website structure comprehension by search engines. The instructor clarifies that while semantic tags don't affect design, they significantly aid search engines like Google and Bing in understanding and ranking websites. The video provides examples of various semantic tags such as header, nav, main, article, and footer, demonstrating how they contribute to a clear website hierarchy, analogous to organizing files in folders. The presenter also touches on the role of semantic tags in enhancing accessibility and SEO, introduced in HTML5 for better content structuring and comprehension.

Takeaways

  • 😀 The video is part of the Sigma Web Development course, focusing on Semantic Tags and their importance for SEO and website structure understanding.
  • 🔍 Semantic Tags are crucial for search engines like Google and Bing to understand the content and purpose of different parts of a website, thus improving SEO.
  • 🏷️ Examples of Semantic Tags include 'header', 'nav', 'main', 'article', 'figure', and 'footer', which help in structuring the website content meaningfully.
  • 🛠️ Even without Semantic Tags, a website can still have good design, but they are essential for search engine optimization and accessibility.
  • 📚 The use of Semantic Tags helps crawlers and anyone parsing the website to understand its structure and content, aiding in better ranking on search engines.
  • 📁 The analogy of organizing files in folders is used to explain the benefit of Semantic Tags, emphasizing the importance of structured content.
  • 🌐 Semantic Tags were introduced in HTML5 to improve the organization and readability of web content for browsers, crawlers, and search engines.
  • 📝 The 'article' tag is used for self-contained content like blog posts or news articles, while 'section' tags are for thematic groupings of content.
  • 📊 The 'figure' and 'figcaption' tags are used for images, diagrams, and charts, allowing for better description and accessibility.
  • ⏰ The 'time' tag is used for representing time-related information, enhancing the semantic meaning of dates and times on a webpage.
  • 🎨 Semantic Tags do not affect the styling of a webpage; CSS is used for that purpose. They are solely for improving content understanding and accessibility.

Q & A

  • What is the main topic of the 11th video in the Sigma Web Development course?

    -The main topic of the 11th video is Semantic Tags and their importance for SEO and the structure of a website.

  • Why are semantic tags important for SEO?

    -Semantic tags are important for SEO because they help search engines understand the structure and content of a website, leading to better rankings.

  • What is the purpose of semantic tags in HTML?

    -Semantic tags in HTML are used to convey meaning about the content and its purpose to browsers and search engines, aiding in better understanding and organization of the website.

  • Can a website have good design without using semantic tags?

    -Yes, a website can have good design without using semantic tags, but semantic tags are crucial for search engine optimization and accessibility.

  • What are some examples of semantic tags mentioned in the script?

    -Some examples of semantic tags mentioned are header, nav, main, article, figure, and footer.

  • How do semantic tags help in structuring a website similar to how folders are used on a computer?

    -Semantic tags help in structuring a website by defining specific sections and their purposes, similar to how folders on a computer organize and categorize files.

  • What is the role of the 'nav' tag in a website's structure?

    -The 'nav' tag is used to define the navigation bar of a website, making it clear to search engines and browsers where the navigation links are located.

  • What does the 'article' tag represent in HTML?

    -The 'article' tag represents a self-contained piece of content, such as a blog post or news article, that is intended to be distributed independently from the rest of the site.

  • What is the purpose of the 'aside' tag in HTML?

    -The 'aside' tag is used for content that is tangentially related to the main content, typically for sidebars or side notes, such as information about the author on a blog.

  • What is the significance of the 'figure' and 'figcaption' tags in HTML?

    -The 'figure' and 'figcaption' tags are used for images, diagrams, or charts, allowing for better semantic understanding of the content and its description.

  • When were semantic tags introduced in HTML, and why?

    -Semantic tags were introduced in HTML5 to improve the organization and accessibility of web content, making it easier for browsers, search engines, and other parsers to understand the structure and purpose of the content.

  • Are semantic tags used for styling purposes in HTML?

    -No, semantic tags are not used for styling purposes. Styling is done using CSS, while semantic tags are used to provide meaning and structure to the content.

Outlines

00:00

📚 Introduction to Semantic Tags for SEO

The speaker introduces the 11th video in the Sigma Web Development course, focusing on the importance of semantic tags for Search Engine Optimization (SEO). Semantic tags help search engines like Google and Bing understand the structure and content of a website, leading to better rankings. The video aims to explain what semantic tags are, why they are essential, and how they can be utilized to enhance a website's SEO. The speaker uses an analogy of organizing files in folders to explain how semantic tags help in structuring a website for better comprehension by browsers and search engine crawlers.

05:02

🏷️ Utilizing Semantic Tags for Webpage Structure

This paragraph delves deeper into the practical application of semantic tags, such as 'header', 'nav', 'main', 'article', 'aside', 'footer', 'figure', and 'figcaption'. The speaker demonstrates how these tags can be used to define different sections of a webpage, making it easier for both users and search engines to navigate and understand the content. The explanation includes the use of 'header' for the top section, 'nav' for navigation bars, 'main' for the central content, 'footer' for copyright and important links, and 'figure' and 'figcaption' for images and diagrams. The speaker emphasizes that semantic tags are not for styling but for improving accessibility and content understanding, which was the primary reason for their introduction in HTML5.

10:04

🔗 Wrapping Up and Encouraging Further Learning

In the concluding paragraph, the speaker wraps up the discussion on semantic tags and encourages viewers to continue learning by accessing the provided code repository and subscribing to the video playlist. The speaker reassures viewers that all relevant information, including styling with CSS, will be covered in upcoming videos and invites them to bookmark the playlist for easy access. The video ends with a thank you note to the viewers for watching and a promise to see them in the next video.

Mindmap

Keywords

💡Semantic Tags

Semantic tags are HTML elements that provide meaning to the web content and structure. They help search engines like Google and Bing better understand the layout and content of a website, which is crucial for SEO. In the video, semantic tags such as 'header', 'nav', 'main', 'article', 'footer', and others are introduced as a way to organize and describe the different sections of a webpage, akin to organizing files in folders on a computer.

💡SEO

SEO stands for Search Engine Optimization, which is the process of improving a website's visibility on search engine results pages through various strategies. The video emphasizes the importance of using semantic tags to enhance SEO because they help search engines crawl and index the website more effectively, as demonstrated by the instructor's explanation of how semantic tags can improve the overall SEO of a website.

💡HTML

HTML, or HyperText Markup Language, is the standard language used to create and design websites. The video script discusses the use of semantic HTML tags, which are a subset of HTML tags introduced in HTML5 to provide more descriptive information about the content, rather than just presentational cues. Examples from the script include using 'header' for the top section and 'footer' for the bottom section of a webpage.

💡Crawlers

Crawlers, also known as spiders or bots, are programs used by search engines to discover and index web pages. The video mentions that semantic tags help crawlers understand the structure and content of a website, which is essential for proper indexing and ranking on search engines. The script uses the term to illustrate how semantic tags aid in making the website's content more accessible to these automated tools.

💡Accessibility

Accessibility in web development refers to the inclusive practice of making websites usable by people with disabilities. The video script explains that semantic tags improve accessibility by providing a clear structure to the content, which can be beneficial for screen readers and other assistive technologies. For instance, the 'nav' tag clearly defines navigation links, making it easier for screen readers to navigate through the site.

💡Header Tag

The 'header' tag in HTML is used to define the top section of a webpage, typically containing the logo, navigation links, and other introductory content. In the video, the instructor uses the 'header' tag to demonstrate how to structure the top section of a webpage, including the creation of a navigation bar within it.

💡Nav Tag

The 'nav' tag is a semantic HTML element used to define a section of a page that contains navigation links to other pages or sections within the website. The video script shows how to use the 'nav' tag to create a horizontal navigation bar, which is an essential component of most websites for user navigation.

💡Main Tag

The 'main' tag in HTML is used to specify the main content of a document. It is intended to contain the dominant content that is unique to the document, and it should be used only once per page. The video script illustrates the use of the 'main' tag to encapsulate the primary content area of a webpage, following the 'header' and preceding the 'footer'.

💡Footer Tag

The 'footer' tag is used to define the footer section of a webpage, typically containing copyright information, contact details, and other secondary information. In the video, the instructor demonstrates how to use the 'footer' tag to denote the end of the webpage content and to include copyright and reservation notices.

💡Figure and Figcaption

The 'figure' and 'figcaption' tags are used in HTML to associate an image or diagram with its caption. The 'figure' tag is used for the content itself, while the 'figcaption' tag is used for the caption. The video script mentions these tags as a way to semantically mark up images and charts within the 'main' content area of a webpage, providing a clear description and context for visual content.

💡CSS

CSS stands for Cascading Style Sheets, a language used to style and layout web pages written in HTML. While the video script does not delve deeply into CSS, it mentions that semantic tags are not used for styling purposes but are styled using CSS. For example, the instructor briefly touches on how CSS can be used to make a navigation bar horizontal, separate from the semantic structure provided by HTML tags.

Highlights

Introduction to the Sigma Web Development course video on Semantic Tags and their importance for SEO.

Explanation of Semantic Tags and their role in helping browsers and search engines understand website content.

Semantic Tags help improve the SEO and overall structure of a website, making it easier for search engines to rank the site.

Introduction to different Semantic Tags like header, nav, main, article, figure, and footer, and their respective roles.

Example of a boilerplate template setup with a folder named 'Video 11' and the use of an index.html file.

Demonstration of how to structure a website using Semantic Tags for better organization and clarity.

Comparison between using generic div tags versus using specific Semantic Tags for elements like headers and footers.

Explanation of the benefits of using Semantic Tags for better SEO and accessibility.

Detailed walkthrough on creating a header and navigation bar using the header and nav tags.

Example of structuring main content and footer sections using the main and footer tags.

Discussion on how Semantic Tags enhance readability and parsing by browsers and search engines.

Explanation of the historical introduction of Semantic Tags in HTML5 and their purpose in organizing content.

Illustration of how to use Semantic Tags like article, section, aside, and time for different content types.

Clarification that Semantic Tags are for structure and accessibility, not for styling, which is done using CSS.

Encouragement to bookmark the playlist and start the repository for accessing all the code used in the videos.

Transcripts

play00:00

What's up guys, you are in the 11th video of the Sigma Web Development course.

play00:03

We have completed 10 videos.

play00:05

So one like is enough for the consistency of all of us.

play00:08

In today's video, we will see about Semantic Tags.

play00:10

Because they are very important for SEO.

play00:12

And to understand the structure of the overall website,

play00:15

search engines are very happy to see this structure.

play00:18

That is, overall SEO of your website is going to be very good if you use these tags.

play00:22

What are these tags? Why are these tags?

play00:24

How to use them

play00:26

what are the benefits, we will see in this video

play00:28

let's go to the computer screen

play00:30

let's roll the intro

play00:40

so guys, first of all, I would like to tell you what are semantic tags

play00:43

here you can see that I have made a folder named Video 11

play00:47

and here I have set a title by putting a boilerplate template of index and html

play00:51

by putting an h1 and setting this image, I am going to preview it here.

play00:55

So this is the image, to explain a little bit, I will tell you what are Semantic Tags?

play00:59

Semantic Tags are for browsers and weblers who want to understand your website properly

play01:06

They tell them what is the content of your website and what is the purpose of which place and which tag

play01:12

If you don't use semantic tags in HTML, then your work will be done

play01:18

It's not that if you don't use semantic tags, then your website won't look good

play01:24

You can do good designing.

play01:26

But we want to explain to Google and Bing search engines

play01:31

about our website.

play01:33

And if we explain them about our website,

play01:36

then they will be able to understand our website.

play01:38

And they will rank our website on Google, Bing,

play01:41

and on the respective search engines.

play01:43

And we want the crawlers can understand our website

play01:45

and we want that whoever wants to understand our website

play01:48

they can understand it well

play01:49

that's why there are some special tags like header, nav, main, article, figure

play01:55

all these special tags are made in html

play01:58

which help you to structure your website

play02:01

now if there is something in the header then I know that it is a header

play02:04

that is, it is at the top if there is something in the header, then I know that it is a header, that is, it is at the top.

play02:05

If there is something in the footer,

play02:06

then I will understand that

play02:07

the website has started ending from here,

play02:09

this footer has started here.

play02:10

This footer could have been div,

play02:12

but no, if I am using semantic HTML,

play02:15

then I will use the footer tag.

play02:17

Along with that,

play02:18

where I was making my navigation bar

play02:20

in the span tag,

play02:22

this time I will not make my navigation bar

play02:24

in the span tag, I will make my navigation bar in the span tag, this time I will not make my navigation bar in span tag, I will make my navigation bar in nav tag.

play02:28

So these kinds of differences explain our search engines very well about what our website is about.

play02:35

So I show you some examples of semantic tags here and I hope you have what are semantic tags now see there are download folders of our computer

play02:45

many of you download folder as if you have downloaded all the files of the world

play02:50

90% of your computer's files are in the download folder of many people

play02:54

but we should not do this

play02:56

some people go to this extent that they start spreading files in their local disk C or windows folder

play03:03

and some people keep files in system 32 also.

play03:07

So if you spread your files in your computer,

play03:12

Then it is not arranged in one way.

play03:14

But if you arrange it in folders,

play03:16

That you have this file in one folder.

play03:19

If you want to keep a secret file in a folder,

play03:22

You put secret files.

play03:24

You can make a folder, With the name of do not open this. If you can put keep a secret file in a folder, you can put secret files. You can make a folder named do not open this.

play03:27

If you can put some of your files in it, then it will be arranged in one way.

play03:31

You have arranged the images in one way, you have arranged the videos in one way,

play03:35

and let's say you have arranged the e-books in one way.

play03:38

So whenever you go to find it, you will get it.

play03:40

So it will be much better for you to understand that folder structure

play03:44

instead of if you are spreading your files throughout the computer

play03:47

You definitely don't want to spread your files throughout the computer

play03:51

So I hope you understood why we use semantic tags

play03:55

It is very good for our SEO

play03:58

I haven't used the word SEO yet

play04:00

But SEO is a very important part of search engine optimization

play04:04

Using semantic tags.

play04:05

So what happens, basically I make your website the way you make it,

play04:08

you just use some special tags.

play04:10

For example, let's say I am making this website,

play04:13

I will comment out this image here, what are semantic tags,

play04:18

I will not comment it out, I will basically make a navbar here.

play04:21

So what will I do, first of all I will say that this is the header of my website, I have used a header tag, I will make a navbar First of all i will say that this is my website header

play04:26

I will make a navbar in this

play04:29

I will make an unordered list in this

play04:32

I will make an li in this and i will write home

play04:35

And after this i will write many more

play04:38

And this is my header

play04:41

So anyone who comes to my website will understand that this is my header

play04:44

Home, about, contact whatever i to write, I can write here.

play04:47

So, this is my header, this is my navbar, it is clearly visible because I have used header and nav tags.

play04:53

So, I write about here and here I write contact.

play04:57

So, here I wrote home, here I wrote about and here I wrote contact.

play05:00

So, I hope you understood this thing.

play05:02

Now, if I want a footer, let's say i want to make a footer

play05:06

here my main content will come after header

play05:08

so i will use main tag

play05:10

and after this my footer

play05:12

in footer i will write

play05:14

copyright cwh

play05:16

and here i will write

play05:18

all rights reserved

play05:20

ok, i can write like this

play05:22

so here see copyright

play05:24

all rights reserved, i have written like this. So here see copyright, all rights reserved,

play05:25

I wrote all this here.

play05:26

Did I...

play05:28

Yes, so what I will do is, I will cut this.

play05:30

I will put this in the main.

play05:31

This is my main content.

play05:33

So first my header will come,

play05:34

then main content will come,

play05:35

then footer will come, as you can see here.

play05:37

And here also you see,

play05:38

this is the header, this is my main content,

play05:39

this is the footer.

play05:40

So what I did in one way is,

play05:42

I arranged it.

play05:43

In a way, the way you arrange your files in different folders, I arranged it. In the same way, you arrange your files in different folders.

play05:45

I have arranged my HTML tags here.

play05:48

So we understood about the header tag that it is used to represent the top section of a web page.

play05:53

Which is a header.

play05:53

After that, we will put nav in the nav tag.

play05:58

Ideally, the article indicates a self-containing piece of content such as blog post or news article.

play06:04

If you put a particular self-contained piece of content, then put it in the article tag

play06:09

Section represents a thematic grouping

play06:12

Suppose one section is talking about one thing on your page

play06:15

The second section will talk about something else

play06:17

Aside means if anything is lying on the side, then it is used as an aside tag

play06:22

So here see, typically used for sidebars or content that is tangentially

play06:26

related to the main content. Like on the aside tag,

play06:28

what you can do is,

play06:30

if you want to put a side note, about the author,

play06:32

you must have seen many blogs where the side

play06:34

is also written, about the author. So you can put

play06:36

such things in the aside tag. Then

play06:38

after this, we have the footer tag, I told you

play06:40

about this, if you want to put

play06:42

copyright information, all these things, or

play06:44

if you want to put some important links of the website,

play06:47

then you can put that in the footer. Then after this, figure and figcaption. What is figure and figcaption?

play06:52

Whenever you want to use images, diagrams, charts, you can use figure and figcaption.

play06:57

In main, the main content area, like the main content area of our speech was this, we put it in the main tag.

play07:03

Then there is also a time tag, used to represent time-related information.

play07:06

So you can use the time tag, you can put date, time or anything in it.

play07:11

So I hope you have understood this thing now.

play07:14

So these are used to enhance SEO, to improve accessibility.

play07:20

And if browsers want to take a decision about our page,

play07:23

Let's say there is a browser, it has a new feature that it will read our content aloud

play07:29

like Edge has a feature, so the browser can decide that I am only reading the main content

play07:34

now think if someone wants to read this page aloud, then how will he read it aloud

play07:37

code with Harry, home, courses, tutorial, you don't want to read aloud like this

play07:42

you want to read the main content. HTML, Semantic Tags.

play07:46

HTML5 Introduce, Arrange, Semantic Tags.

play07:48

The first versions of our HTML,

play07:51

They didn't have Semantic Tags.

play07:53

Semantic Tags were introduced from HTML5.

play07:55

And the most important reason to introduce Semantic Tags in HTML5

play08:00

is to arrange things.

play08:02

So that the browser or whoever is parsing the content

play08:05

whoever is looking at the code of our content, whether it is a browser, crawler, google, bing,

play08:10

search engines or anyone who wants to generate a preview, like you put a URL on Twitter

play08:15

and want to generate a preview, if there are such things, then you will want

play08:19

that your content can be understood properly, so if you want your content to be understood properly,

play08:25

then you will use semantic tags.

play08:28

Here this image is explaining very well that

play08:30

if you write HTML without semantic tags,

play08:33

then you will write like this for semantic tags.

play08:35

This image you are seeing, this is a header, this is a nav, this is a side.

play08:38

How to throw one thing in aside, we will do all this with CSS.

play08:42

Don't be confused, this is not used for styling.

play08:46

Because many people get confused that

play08:48

Is it used to assign things?

play08:50

No, it is not like that.

play08:52

You have to style things with CSS.

play08:54

But here

play08:56

Your content can be understood well.

play08:58

Can be described.

play09:00

Which is the main content, which is the header or footer.

play09:02

That's why semantic tags are made.

play09:04

So semantic tags do not do any magic. why semantic tags are made Semantic tags don't do any magic

play09:06

Semantic tags are made only for accessibility

play09:08

And to understand your page

play09:10

Now here are some examples that you can see

play09:12

I have given the example of header and footer tag

play09:14

What will happen inside the header

play09:16

Here you see that you will ideally put your navigation bar inside the header

play09:19

And then you will style it with CSS

play09:21

I will show you a very quick styling

play09:24

Obviously we will talk about styling later

play09:26

but many people must be thinking

play09:28

how this navigation bar will be horizontal

play09:30

so if you want to make the navigation bar horizontal

play09:32

then I will write some CSS here

play09:34

and I will tell you all this

play09:36

why does CSS work here

play09:38

so you see I have flexed the display

play09:40

so it happened like this

play09:42

so a lot of things are going to happen in the coming videos

play09:44

so don't worry at all at all. That we didn't do this, we didn't do that.

play09:46

I will tell you everything.

play09:48

And the CSS I wrote here, what does it mean?

play09:50

Why did I write CSS by inspecting?

play09:52

I will tell you about this too.

play09:54

I will reload, it went. Why did it go?

play09:56

We are going to see all this in the CSS section.

play09:58

If you have not accessed this playlist yet, then do it.

play10:00

Bookmark the accesses.

play10:02

Click here and save it.

play10:04

And I am uploading all the code

play10:06

so as you move forward in the videos, you will get all the code here

play10:09

do start this repository if you haven't done it yet

play10:12

and also like the video

play10:15

thank you so much guys for watching this video and I will see you

play10:18

next time Thanks for watching!

play10:36

you

Rate This

5.0 / 5 (0 votes)

Related Tags
Semantic TagsSEO OptimizationWeb DevelopmentHTML StructureSearch EnginesWebsite DesignAccessibilityContent HierarchyHTML5Crawlers