As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 12 years ago.
I used to be a tab freak -- I would always use tabs to indent my source code, and if I saw any spaces, I would instantly do a regex search/replace to replace all leading spaces with tabs.
...until I realized that I hadn't noticed the presence of a lot of the spaces in some files, such that they opened up inconsistently in different editors (e.g. Notepad++ vs. Emacs vs. Visual Studio).
What are good reasons for why one is better than the other in general? Is either one generally known as better practice?
With good text editors, it does not really matter. It is just a technical background detail. The UI behavior will be just the same.
The only important thing here is that everyone in a project makes the decision what to use, and that everyone sticks to that. Because, as you discovered, there will be problems if both tabs and spaces are used for indentation inside a file.
UPDATE: When I mean that everyone in a project makes the decision what to use, I of course mean that everyone should agree on the same decision. :D (This can be the tricky part.)
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
In professional development different people make code for web applications and HTML for views. First are programmers and second are HTML markup developer with basic programming skills, but with good skills of Photoshop/etc.
I have asked some of HTML developers: did they try Haml? I showed it to them and they replied that it's an awful tool.
For Whom is this tool? For HTML developers? Or just for programmers who have to make HTML on their own without HTML developers?
What is the advantage of using it for HTML developers?
The Wikipedia entry for Haml does a good job of explaining the problems that Haml tries to solve. In short, it allows for more readable, less verbose markup by enforcing indentation, reducing repetition, etc.
It's probably more useful for a programmer who's using it inside of a framework like Rails, which will automatically take care of converting the Haml markup to HTML in the context of a web application.
A designer working with HTML and Photoshop might not find it worth the extra complexity it would add to their workflow.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Sorry if this is a dumb question, but I just got a job developing a site in French. Is there anything I should do or do differently that I wouldn't do if I were coding an English site?
There are a few typographic specialties in French that a well-designed HTML page should handle somehow, such as special spacing rules around punctuation characters. They are somewhat tricky to handle with just HTML and CSS. See my page HTML authoring in French.
I don't think you have anything to worry about with regards design / look n feel.
You'll have a lot to worry about with regards content though.
Date formatting
Currency formats
Thousand separator and other stuff
I'm assuming you aren't saddled with the task of working on the content as well.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I work in front end markup so I'm constantly templating site. Does anyone know of good resources to learn some good conventions or inspiration for element names? I like names that relate to print layouts so perhaps someone could point me to a resource for naming different sections of a document/layout.
I get a bit sick of using generic names such as block, wrapper, content, header etc over and over. Things like colophon, masthead, hero etc seem to hold more meaning.
A little bit of inspiration
I remember finding this when I was searching for the same thing. It's a collection of names used by some of the best known css guys. It comes from Andy Clarke
Here you go as requested in your comment...
http://meiert.com/en/blog/20080812/best-practice-ids-and-classes/
Got this in 10 seconds by typing 'best practice html class names' into Google.
Personally, I name my elements as abbreviations of what they relate to - div containing a submit button I would name 'smtbtn'. Short, sweet and phonetically almost says what it is.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I haven't completely understand the concept of semantic HTML.
What benefits does the semantic HTML give, besides of readability/tag meaning/clean code? I've read the answers in What are the benefits of using semantic HTML? , but I haven't found any answer that says its usefulness to anyone besides coders/designers.
I've heard that semantic HTML is also useful for SEO, is it true? Also, is there any benefits for the users or for the browsers?
Sorry for my English, it is not my native language...
Accessibility!!
Like for blind people, they use software to read internet pages and to navigate.
A good semantic is a part of accessibility and a good help for them!
Plus all the stuff mentioned: SEO, clean code... Which are quite interesting also :)
besides of readability/tag meaning/clean code
Not good enough for you? Those are substantial benefits by themselves.
With the semantic web, you can write software that understands the semantics, the meaning of pieces of data.
With that, you get better results from search (yes, better SEO), more relevant information and better ways to organize information.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I am currently building a Website that uses a blackletter font. I try to make it as authentic as possible, but I want to keep the code clean. So I got a few questions
Is it possible, to replace every semikolon (or any other letter, e.g. to autmoatically fill in the medieval sz-letter) with a dot (via css)?
Is it bad program style to use <br /> to correct the justification? If yes, how would you do it?
Does anyone know an opentype blackletter-font, that is using CSS3's hist-feature?
Is it possible, to replace every semikolon (or any other letter, e.g. to autmoatically fill in the medieval sz-letter) with a dot (via css)?
the answer to that is no. You'll need JavaScript or server-side programming to do it.
Alternatively, you could of course edit the font you're using and do the substitutions there - but that's really hard. The font's license must allow it; you need to have the right tools, and you need to beprepared to deal with the possible kerning issues that simply replacing one character with another will bring.