What is the benefit of semantic tags? [closed] - html

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I'm following a tutorial series on web development. While I already have a basic understanding of HTML and how to use it to structure a page, I'm indulging myself and watching the very beginner tutorials. The funny thing is, in these tutorials the author is using tags like address and cite. When he describes why one should use these tags, he explains it only as "semtantics."
While I feel like these tags may have been more prevalent ten years ago, I never run across anyone using them besides this guy. Given he is professional, I'm now conflicted on whether or not its really necessary to use them. What is the benefit?

According to the current HTML5.1 specification nightly (as modern as it gets):
The address element is valid perfectly fine to use and so is the cite element. While a lot of sites tend to mostly use tags like div and span you can feel safe to use both address and cite .
I think it's good practice that will help you later when you have to read your HTML again to insert changes. It improves accessibility of your document as well as lets parsers other than browsers understand it better.
(Note, address and cite are legal in the old HTML specification too)

The benefit of semantic tags is that they give your html some structure - by using them you are encoding meaning into your html that can be useful in all kinds of areas. Search engines often use semantic tags to assist in ranking pages, to use a simple example. Whilst it might not always seem necessary, it is good to get into the habit of using them wherever possible.

Related

Why do I need those tags? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
Why do I need those tags ? :
Footer
Main
Article
Section
Form
Even if I don’t use those tags, I can get the same result, so what's the point of using these tags at all?
From MDN:
The HTML5 specification introduced several semantic sectioning elements to help organize the structure of documents. Semantic sectioning elements are specifically designed to communicate structural meaning to browsers and other technologies interpreting the document on behalf of users, such as screen readers and voice assistants.
Semantic sectioning elements clarify the larger-scale structures within a document. They are intended to enhance the limited semantics of earlier versions of HTML, which included only the tag as a generic mechanism for grouping related content
To mention also:
Important: There are no implementations of the proposed outline algorithm in web browsers nor assistive technology; it was never part of a final W3C specification. Therefore the outline algorithm should not be used to convey document structure to users. Authors are advised to use heading rank (h1-h6) to convey document structure.
and this is why you can't find any resources, because it is not standardized, and so it hasn't a common significance
Originally, HTML was all about formatting. That's why you have tags like b and i. Those tags tell you how the page is supposed to look, but they tell you nothing about what the data actually means. Over time, there's been a movement towards separating meaning and the appearance (especially with the advent of HTML5). That's why those tags exist.
With regards to your list, note that the form tag is different than the other ones you list - that particular one means that all of the input tags inside the form are intended to be sent to a server.
Yes, you can definitely do all such things without all these tags but it helps the browser to understand your code better and it will help you when you make big/complex website to understand edit your code easily.

relevance of table tags in html page layout [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
I'm a newbie here and I have a question which has been bothering my mind. In html, is the table tag: <table></table> still useful for making page layout nowadays? Also, do i still need to have a basic knowledge of it, because the <div> tag and <span> tag have become a good part of me when I lay out my web pages.
It isn't a matter of using tables or divs/spans for layout. You don't use either for layout.
HTML elements are used to describe structure and semantics (and there is plenty of data out there with a structure best expressed using a table).
CSS is used for layout.
There are many ways to layout a web page. Although the <table> tag is one option that was quite popular, it is no longer considered the best practice. It is still used often and it is useful to have an understanding of how it functions.
I recommend that if you are new to web design and best practices that you take some time and explore the W3School's website. It is full of tutorials and interactive examples that are incredibly useful and informative.
There site is: https://www.w3schools.com/
For their explanation on the <table> tag and its uses see:
https://www.w3schools.com/html/html_tables.asp
Here is their article on website layout:
https://www.w3schools.com/html/html_layout.asp

Standards: attribute order in HTML [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I've been working on updating the coding standards for my web development organization. One aspect of this that has proven contentious among my co-workers is the ordering of HTML attributes. One co-worker, and many sources I have found online, suggest that class or id should come first, followed by others in order of importance.
<a class="foo" href="/bar/baz.html">Link</a>
Supposedly, this aids in readability. I'm not so sure in this case. Sometimes, when people say something is more readable, what they mean is that they have become accustomed to a certain pattern, and can't browse as easily without the pattern. Which is really more subjective than readability. Another co-worker suggests (and I happen to agree with him) that the defining attribute of the element should come first, and then any presentational or organizational attributes should follow. The essence of the anchor tag is the href attribute.
Link
This might be trivial on an anchor tag, so what about an input tag?
When scrolling through a form, I want to know right away what the input's type is: text, radio, button, etc. Class can come later.
How do the rest of you feel about this topic? I'm interested in hearing any arguments for both sides. Maybe we shouldn't even be worrying about this particular bit of syntax?
Technically, it doesn't matter at all. In terms of personal preferences, all that matters are the personal preferences of those on your team.
My personal preference is that this is minutia and overhead that no one really should be dwelling on.

Providing website in only html 5? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I am designing a website which has to reach old and new browsers. With this in mind should I program in HTML5? Currently the website is only in html 5. The question is: Is it stupid in my case to use HTML5, should I use a "switch"(is this even possible) to redirect old browsers?
The question is, what aspects of html5 do you plan to use?
If your website is mostly static html & javascript, no audio and no embedded video, then I would say it use HTML4.
If your not using any tags in html5 dont rush it, no
If you're trying to reach a broad audience, I wouldn't necessarily jump into HTML 5 yet. It's still not supported widely or consistently enough to rely on it. However, there are several resources available if you want to give it a shot.
When Can I Use... should be a big help. It shows which features of HTML 5 are supported in which browsers fairly clearly. It would probably be good to research further about each tag you plan on using. Learn how the major browsers have implemented the tags, and if there's any quirks or bare-bones implementations that might be an obstacle to the average user.
I've heard Modernizr listed as a means of leveraging HTML 5 elements while maintaining backwards support for old browsers. Do note that I can't testify personally to how well it performs, having never used it before.

Are you familiar with <ins> tag in html? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I just found that google uses this tag for adsense,
but seems it also works without this tag,why they prefer to use it?
The <ins> tag is used to indicate content that is inserted into a page and indicates changes to a document. According to the HTML spec this was intended primarily for use in marking up versioning of a document.
Clients that aware of this tag may choose to display content inside this tag differently or not at all depending on what they are designed to do. This is very much semantic HTML
As for why Google decide to use it I couldn't say
INS is semantic tag describing something that is inserted to the text after the text was already published. It is not a big deal, it is I guess used by their robots to understand something they care about.
Adding semantics to markup allows tools to extract more meta data from them. Google is in the business of writing such tools, so has good reason to encourage the use of code that they can use.