two space tab is the safest one? [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
Bumped into such a statement:
Use soft tabs with two spaces—they're the only way to guarantee code renders the same in any environment.
Is that true? (and why?)

No this is not true and everyone has an own best practice related to editor settings and code formatting.
I think that two spaces is just to few, because in long source codes with several nesting levels it is much easier for me to distinguish between different indentation levels if there are ate least four spaces used as tab width.

Related

Is Ragel a declarative way of regexp or it has more than that? [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
I was reading an HTML parser article and noticed that they used Ragel for parsing a web page. Is it because it is more readable than using regexp or there is a different meaning behind it?
I read several things about Ragel, but they were too complex for my understanding. It would be cool if somebody gave an example of Ragel.

Is it bad practice to use inline styles? [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
Is it bad practice to occasionally put some CSS directly into some HTML tags if I am sure that it won't be used again?
For instance:
<div style="padding-left: 0"></div>
Or do I have to systematically create new class even for little tweaks that will pollute my CSS file?
Yes it is fine. Stylesheets are used mostly to style multiple pages in the same manner and for easier editing. Putting css directly in html also overrides all other conflicting styles.
There is a Programmers Stack Exchange site that's a better fit for questions like this.
Here are two existing questions there that cover this particular topic:
https://softwareengineering.stackexchange.com/questions/138538/is-it-a-bad-practice-to-use-inline-styling-with-generated-code
https://softwareengineering.stackexchange.com/questions/125893/when-should-i-use-a-css-class-over-inline-styling

Best Practice for image link [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
Just Wondering if some could explain difference between following 4 ways of uses of image in a website.
/img/log.png (in http://example.com)
http://example.com/img/log.png
http://example2.com/img/log.png (Different website on same server)
http://example3.com/img/log.png (Different website on different server)
Performance wise which is the best?
This is a bit of a silly question, and that isn't 4 ways of using an image. So I'll give you a kind of answer.
When referencing an image from within your site just use
/img/log.png
When referencing images hosted elsewhere
//website.com/img/log.png
By using the // instead of http:// you will avoid SSL issues. That is about the only help I can offer. Other than that, check out some "Learn HTML" sites or books. Even a quick hour study session should help you move past questions like this.

find pages that have been 'redirected' on mediawiki [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 8 years ago.
Improve this question
I have many redirect pages on my wiki. They are hidden from the search by default, but I would like a way for an admin to see a list of them.
How can I do that?
There is a special page called Special:ListRedirects for that.
The list is limited to 1000 redirects, but some WikiMedia wikis can show up to 5000 results, so there seem exist some way around that limitation.

How to detect advertisement link? [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 2 years ago.
Improve this question
I want to detect the links in page which are used for advertisement. Or is there any statistical data by which I can guess this link is for advertisement?
I know this isn't a concrete answer, but if I were doing the same, I'd take a look at AdBlock and other add-ons in browsers such as Firefox since they do much the same. There are quite a few open source add-ons out there where you can view the code that does this. And even most email programs detect junk mail (and ads) using Bayesian filters which I'm sure with a bit of tweaking would work well.