This may be a stupid question. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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?

12th Jun 2018, 5:09 AM
Daniel Cooper
Daniel Cooper - avatar
37 Answers
+ 19
It's just to make things neat and clean, readable to others and easy to change things in future.
12th Jun 2018, 5:35 AM
Prathamesh Sawant
Prathamesh Sawant - avatar
+ 17
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.
12th Jun 2018, 5:28 AM
Akash Pal
Akash Pal - avatar
+ 11
there are very important in SEO
12th Jun 2018, 7:00 PM
Nomeh Uchenna Gabriel
Nomeh Uchenna Gabriel - avatar
+ 11
good
20th Jun 2018, 3:16 PM
Archana
+ 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
13th Jun 2018, 3:17 AM
Tubusan
Tubusan - avatar
+ 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.
12th Jun 2018, 5:23 AM
Alexander Sokolov
Alexander Sokolov - avatar
+ 8
They are just CSS shortcuts. Yes 99% of HTML is all about using in-built CSS!
13th Jun 2018, 2:22 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 7
Daniel Cooper, you know why most website's source code are beautified? Because its easier to read.
15th Jun 2018, 11:59 AM
Jake The Great
Jake The Great - avatar
+ 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.
12th Jun 2018, 9:00 PM
Nomeh Uchenna Gabriel
Nomeh Uchenna Gabriel - avatar
+ 6
every TAG has its own use at some point !!
13th Jun 2018, 6:06 AM
Prabhat
Prabhat - avatar
+ 5
tags are good for organization, hierarchy and SEO. They make easier to other coders to read your code.
13th Jun 2018, 3:39 AM
Juan G.
Juan G. - avatar
+ 5
https://webflow.com/blog/html5-semantic-elements-and-webflow-the-essential-guide read this article why HTML semantic elements important or why not
13th Jun 2018, 2:57 PM
Akash
Akash - avatar
+ 5
This a good question. Cause it makes code with style CSS and JavaScript easly
15th Jun 2018, 6:16 AM
Siti Kusuma Wuryanti
Siti Kusuma Wuryanti - avatar
12th Jun 2018, 5:21 AM
Daniel Cooper
Daniel Cooper - avatar
+ 4
Most tags do not really affect the result. However, some are styled differently and have specific functionallity (i.e.: textarea).
12th Jun 2018, 6:29 PM
Nboumakis
12th Jun 2018, 8:19 PM
Daniel Cooper
Daniel Cooper - avatar
+ 4
Stuff that seem useless might have an important role inside that only the developer knows.
12th Jun 2018, 8:19 PM
Ömer Eren
Ömer Eren - avatar
+ 3
<p> <b>No tag is useless!</b> </p>
12th Jun 2018, 9:03 PM
Ömer Eren
Ömer Eren - avatar
+ 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?
12th Jun 2018, 9:23 PM
Daniel Cooper
Daniel Cooper - avatar
+ 3
i was writing a python program to scrape content from a web site. Tags were very useful in figuring out quickly where useful text is. Another example (maybe someone already mentioned this) is content management systems (like wordpress) rely on html tags to make publishing web content fast and easy. Also, technologies rely on tags to build useful apps for the web. Just some examples to show where standard tags can be very useful & even necessary. Formatting and organizing stuff on the web page is just one reason but there are tons of reasons for software that helps us find and make sense of content.
16th Jun 2018, 4:00 PM
Umair Salam
Umair Salam - avatar