Lowest price ever! Learn Generative AI for 48% less!
Get my discount+ 38
This may be a stupid question.
Why are HTML tags important? Why does it matter if I define the footer of my website with the footer tag or if I define it with a div or something? I get why some tags are important. They actually do something noticeable. But some tags just seem useless. Does it actually matter that the browser knows what every part of a website is for?
38 Answers
+ 66
Not a stupid question but good point. Tags dont really matter, they just make it easier for us to read and understand
footer can be done with a div (actually good old divs were usually the go to to make similar tags included in HTML5+)
And no the browser does not care; computers do what you tell them to. If it is doable, they do it even if logical errors are present. I have seen people improperly use tags but the outcome was unnoticable
+ 19
It's just to make things neat and clean, readable to others and easy to change things in future.
+ 18
Daniel some of the tags, we are using today seems like they are useless but before HTML5, they were very useful. Div and some other tags were introduced in HTML 4.01. It made the Html easier as before that they were not a good option to define the different section in an HTML page. After HTML5, There were certain new tags such as footer, article, nav which were going to make take place of the div. But because it is useful in defining a good block of sections. It is still useful. Html5 just makes our life easier by introducing such tags. All the tags have there own value.
+ 11
there are very important in SEO
+ 11
good
+ 9
HTML was originally intended as a means of describing the content of a document, not as a means to make it appear visually pleasing.
Prior to HTML5, this style of coding was very common:
<div id="header">...</div>
<div id="menu">...</div>
<div id="content">...</div>
<div id="aside">...</div>
<div id="footer">...</div>
That's how they came up with the tag names in HTML5, which introduced all these new semantic elements, to make code meaningful, easy recognizable both for the web spiders and for developers.
Here is a summary of why it is important to use semantic markup:
- Better search engine rankings
- More maintainable code
- Easier code to style with CSS
- More accessible code for blind and partially sighted users
- You are future proofing your code
- You are using the right tools for the job
+ 8
HTML truly powers the Internet.
It’s the fundamental technology behind everything you see in a web browser, and it’s used (alongside other tech like JavaScript and CSS) to build everything from simple web pages to complex web applications and services.
But there are lots of good reasons to learn HTML beyond just pursuing a career designing websites.
+ 8
They are just CSS shortcuts.
Yes 99% of HTML is all about using in-built CSS!
+ 7
every TAG has its own use at some point !!
+ 7
Daniel Cooper, you know why most website's source code are beautified? Because its easier to read.
+ 6
Daniel Cooper yes! SEO(Search Engine Optimization)!
...search engines like google depends on the semantic tags used in a website to determine which one is the question/answer.
Eg:
<h1>
What is def
</h1>
<p>
It's a function keyword in python.
</p>
here the header-1 tag is the question while the paragraph is the answer to a search engine.
+ 5
tags are good for organization, hierarchy and SEO. They make easier to other coders to read your code.
+ 5
https://webflow.com/blog/html5-semantic-elements-and-webflow-the-essential-guide
read this article why HTML semantic elements important or why not
+ 5
This a good question. Cause it makes code with style CSS and JavaScript easly
+ 4
Most tags do not really affect the result. However, some are styled differently and have specific functionallity (i.e.: textarea).
+ 4
+ 4
Stuff that seem useless might have an important role inside that only the developer knows.
+ 3
<p>
<b>No tag is useless!</b>
</p>
+ 3
Nomeh Uchenna Gabriel I don't think the engine cares what tag holds the questions/answers. What if I put the same thing under different tags?
I could be wrong, but that just seems unlikely.
Is there a link that proves this?