Are Non-HTML tags in a HTML document bad for SEO? [closed] - html

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 9 years ago.
Improve this question
Is it a bad practice have non-HTML tags of the page? I need to use them for internal content processing needs and wonder if there are any troubles with it (SEO for example)?

Yes it is bad. Not particularly for SEO but for browsers. You are relying on the browser to ignore your tags and render the page correctly. Since every rendering engine loads a page slightly differently, you have no way of knowing how it will handle your bad html.
Can you wrap them in html comments? Like so:
<!--<not a real tag>-->
The browser and spiders will ignore these but since they are still part of the html, your parser might still be able to read them.
An alternative is to use HTML5's custom data attributes. Your parser should also be able to read these.
W3C also have an experimental custom elements spec. Browser support looks poor at present but this may be of interest in future.

Yes, it's bad for browsers (and a little for SEO). Each browser could interpret a random tag on its own way.
If you need to do internal content processing, you can store your data in attributes of your existing HTML tags, with data-* attributes (HTML5 spec.), like this:
<div class="simple-div" data-file="./abc.txt" data-pattern="(.+)"></div>
My link!
The HTML document shouldn't store data anyway.

I dont know what you want to do specifically, but you could use an invisible div or hidden field with custom data attributes? or even a comment?

Related

Is there any meaning behind so many tags in html? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 months ago.
Improve this question
So I am now learning html, and I was just wondering why tags such as cite even exist. When I open a website as a user, I still see the text as italic when the code is written as cite.
I found that the tags are useful when it comes to screen readers, so basically for users that have problems with their vision.
Are there any more reasons for these tags? Thank you so much in advance!
Tags are small snippets of HTML coding that tell engines how to properly “read” your content. In fact, you can vastly improve search engine visibility by adding SEO tags in HTML.
When a search engine’s crawler comes across your content, it takes a look at the HTML tags of the site. This information helps engines like Google determine what your content is about and how to categorize the material.
Some of them also improve how visitors view your content in those search engines. And this is in addition to how social media uses content tags to show your articles.
In the end, it’s HTML tags for SEO that will affect how your website performs on the Internet. Without these tags, you’re far less likely to really connect with an audience.
About cite tag: The tag defines the title of a creative work (e.g. a book, a poem, a song, a movie, a painting, a sculpture, etc.). Note: A person's name is not the title of a work. The text in the element usually renders in italic.
Regarding the cite tag, according to MDN:
The HTML element is used to describe a reference to a cited
creative work, and must include the title of that work. The reference
may be in an abbreviated form according to context-appropriate
conventions related to citation metadata.
This enables you to manage all the css applied to quotes easily, were that to be your use case (if you happened to have a lot of quotes on a site). The italics you have observed are part of that css, or rather the default css applied by the browser.
In the broader spectrum
Oftentimes you will run into tags that as of today are not in use anymore. There's different industry standards for different time periods.
All of the tags exist, because there was a reason for web browsers to have a specific way of reading a piece of content.
For example centering a div used to be an almost legendary task that was achievable using multiple methods, all of which had different advantages and disadvantages. However, nowdays it's customary to use the flexbox.
Bottom line is its a way for web browsers and search engines to read and interpret the content you're providing
Tags such as and are used for text decoration nothing else you can also change text fonts and styles by using CSS.

Why bother with HTML5 header, main, section elements, et al? [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 5 years ago.
Improve this question
all of this are only for make it more easy to read the html code? because they dont have any function more than that right ? ;( we can do all without that
<Div>
<p>
Example
</p>
</div>
<p>
same Example
</p>
all of this are only for make it more easy to read the html code? because they dont have any function more than that right ?
Not exactly.
These things make it easier for the browser and the website crawlers, screen readers, page printers, meta recorders, etc., -basically, any no-human/digital entity- to read the structure of the page, (combined with Schema metadata this can be quite powerful).
This means that you can put what you like in the <nav> tag or the <aside> HTML5 tag because the browser can read the syntax structure and know these are navigation links (therefoe useful for screen readers or for mobile devices to handle correctly) rather than core contents of the page central to the issue discussed on the page (such as details about why HTML5 is a good thing).
A good full answer to your question can be found here:
Why bother with Semantics.
Summary points from the link above:
More consistant cross browser implementation
Style normalization
Semantic markup makes glaring differences less likely.
Less typing
Craftsmanship: When something is well built it is less likely to break.
Accessibility
Maintainability: Code that makes sense is more maintainable.
Please bare in mind this article above was written in 2014 so it's references to "some browsers not being up to dat is now moot and old hat.
Your original statement including <div> tags is incorrect as ths is not HTML5 specific and a <div> is simply a container element that is used by your webpage styling and application level code such as javascript and CSS. A div can be anything you want it to be.
it supposes that it helps search engines to give a rank at the webpage and it could be used also for SEO.
https://www.codesmite.com/article/is-there-any-seo-value-in-html5-semantic-elements
Take from the above link:
Even in 2017 there are very few published case studies or official acknowledgements by Google that having an semantically HTML5 correct website will move you up in the rankings, or create better exposure from public searches. But it is safe to acknowledge that the more semantical detail you provide to bots then the better search engines will be able to understand and index your content. Using HTML5 elements surely can’t hurt.
https://www.inboundnow.com/html5-semantic-elements-mean-seo/

HTML vs. XML - difference [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
What's the difference between HTML and XML?
I'm well familiar with HTML, but my knowlege about XML very limited.
In old-fashioned HTML we were forced to write something like:
<div>
<p>Hi</p>
</div>
In other words, in HTML we have limited set of tags.
Unlike XML, where we can specify our own tags:
<letter>
<to>John</to>
<from>Mike</from>
<date>01.01.2017<date>
<contents>Hi!</contents>
</letter>
However, now I have Chrome installed on my computer, and it's history page looks like this:
<body>
<history-app>
<history-router>...</history-router>
<history-toolbar>...</history-toolbar>
<div>
<history-side-bar>...</history-side-bar>
<iron-pages>...</iron-pages>
</div>
</history-app>
</body>
As you can see, there are a lot of tags, which are not exist in HTML.
The same case with AngularJS, where we can create our own custom tags.
So I'm a bit confused is there any real difference between XML and HTML in modern times.
Also, maybe (I'm not sure, because as I said, my knowledge about XML is very limited), XML provides some rules (schemes) about how tags can and can not be organized. For example, I have some scheme called "Standard Letter", and according to this scheme, tag <letter> should always contain tags <to> and <from>, and moreover, <to> must be the first. Hm... but HTML also has such requirements. For example, <table> always must have <tr> inside, and <td> inside <tr>.
Previously, I've asked about difference between DocBook and HTML. But I've also decided to reformulate it in a new manner, as described above (XML vs. HTML).
HTML and XML are both markup languages that share a common heritage with an older markup language, SGML.
Use HTML (and CSS) when you wish to target presentation in web
browser.
Use XML when you wish to define custom markup for documents. XML
will allow a document to be marked up for what content is rather than
for how content should look. Content can then be decoupled from its
presentation, allowing content to be independently translated to different
media such as web or print automatically.
(And use JSON when you wish to define custom data formats that are data rather than document oriented.)

SEO: <button> vs <a> HTML tags [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 9 years ago.
Improve this question
I'm building a project using Twitter Bootstrap. In the documentation it's stated:
Button tags
Use the button classes on an <a>, <button>, or <input> element.
[...]
Cross-browser rendering
As a best practice, we highly recommend using the <button> element whenever possible to ensure matching cross-browser rendering.
Is this a good practice SEO-wise speaking?
SEO-wise it is best to use the <a> tag since search engines don't go through buttons nor input but rather look for anchor tags and their attributes (href, title). So if you're linking to another page on the website which needs to be crawled by search engines it makes more sense both for SEO and with regards to semantics to use an anchor tag.
On the other hand if you're building a form, it makes much more sense to use the <button> or <input> and in this case, you should follow the recommendation in the documentation.
I believe the reference in the documentation should actually say:
[...] recommend using the element instead of the input
element whenever possible [...]
Also note that most form elements including <input> and <button> have browser specific styles that are sometimes hard/impossible to change without JavaScript hence this comment in the Twitter Bootstrap documentation.
As i know google doesn't click on buttons and this bad for SEO.
because many buttons makes form submit or JavaScript execution and it's not useful.
I can see it on google-analytics of my website. it's caching only a tags href's.

How did the DOCTYPE tag come about? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I was wondering how the DOCTYPE tag came about.
I understand the purpose of the tag which is to alert a browser on how it should render the HTML document, but I don't understand why they created a new tag for it as opposed to putting that information as an attribute of the HTML tag: the HTML tag can already take a language attribute.
I thought it might have to do with preprocessing since the doctype is required at the very beginning of each document (though the HTML tag would be at the beginning of the document if the DOCTYPE wasn't there), but I was hoping for a more definitive answer than my own conjecture.
I've tried using several queries in Google for the answer, but most return the "why you should use a doctype" instead.
I understand the purpose of the tag which is to alert a browser on how it should render the HTML document
No.
The Doctype associates an SGML document with a DTD. The DTD is used for validation (is describes which elements and attributes are allowed where), and to expand entity references. HTML 4.x and lower are SGML applications.
XML is derived from SGML and the Doctype is used for the same purpose in XML. XHTML is an XML application.
The use to determine rendering modes was a hack by browser vendors trying to deal with web pages designed around bugs in browsers.
HTML 5 reinvents the Doctype purpose for backwards compatibility with the render mode switch.
I don't understand why they created a new tag for it as opposed to putting that information as an attribute of the HTML tag
Then a validator would have have to parse the HTML start tag before knowing if an HTML start tag was allowed there, and it would have to parse it before being able to expand any entity references used in its attribute values.