What is the best practice for writing XHTML? [closed] - xhtml

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.
Does anyone have a check list on the best practices for XHTML?

Have a look at XHTML Best Practices.

If you use the W3C validator service, you'll learn a lot about how your XHTML should be structured.

Ensure the benefits outweigh the pain (otherwise stick to HTML)
Validate
Separate style from content
Be accessible
Be progressive
Separate your concerns (keep CSS and JS in external files)
Use UTF-8 (unless you are working in a language where 16 or 32 is more efficient)
Test in multiple browsers as you develop (fixing all the IE6 bugs at the end is harder then fixing them as they show up)

I'd say best practices are to make your code clean. Organize your tags. Put notes if you want in your code /This is a note/. Have an external style sheet.
Like may already point out, validate often at http://validator.w3.org/
validate your CSS too at: http://jigsaw.w3.org/css-validator/
Also, don't overlook the
<meta name="Description" content="you put in here the description of your page. It will appear on search engines" />
Give a specific title to each page.

Related

Which is a better interface for designing an ASP.net application: drag and drop or manual positioning? [closed]

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.
Which is a better interface for designing an ASP.net application: drag and drop or manual positioning?
That defines on how you define "better".
"Better" in the sense that even an unskilled developer can get a webform up and running in no time: Use drag and drop.
"Better" in the sense that it gives a skilled developer more control over the generated HTML and CSS, potentially leading to
more robust layouting, compatible with a wide range of browsers, and
easier maintainance, due to a lack of unnecessary tags and attributes:
Use manual positioning and a lot of knowledge about HTML and CSS.
You use them all - anything to make the design you look for.
Drag Drop, Manual position, tweak changes, css write/change/delete/re-write, copy/paste, open close ten programs, search on google for other css, anything to make what you have on paper - and then is not good and you start over. Anything you can have you use it.

Tool to identify repeated CSS selectors across two stylesheets [closed]

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.
We're bringing in outside content to our existing site along with its associated external CSS stylesheet and need to identify the CSS selectors that share the same name across the two files. Once identified, we plan on manually modifying each duplicate in the newly imported file, then changing the HTML accordingly.
Does anyone know of a tool that will do this? One painful way I thought about was to combine all the CSS into one Word Document and going down the page doing manual Finds? That would be nice to avoid though.
There is a firefox plugin called Dust me selectores which is designed to find unused CSS code. It may be what you're looking for.
You could merge the files into one, use a tool like CodeBeautifier with sort selectors enabled. A word of caution though: sorting selectors may change how they are applied to the final document.

Best Tool for Mockup to CSS? [closed]

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've been using Paint.NET to create mockups for my web application. They're pretty, and it's not hard to save the constituent graphical elements. However, the process of getting my layout into CSS is completely manual and time-consuming.
I'm aware there are better tools out there for this. Should I be looking at DreamWeaver? I'm not looking for any auto-generated web or data access functionality, and I'm happy to code all the behavior myself. I'm mostly looking for a great-looking layout editor that understands both layered imaging and CSS. (Preferably, one that can map a layered image to HTML and generate initial CSS with the right styling.)
Thanks in advance for any and all insight!
Jeff
A text editor, really.
It's time consuming, yes, but so is doing anything right. I have yet to use any program that builds the design of a website with a level of markup quality that I find even remotely acceptable. Where you may give a div a class of userInfo, most layout programs might give that div a class of style12 or something equally unhelpful. This results in unmaintainable markup, which is especially hard to build into a web application.
So learn how to do it by hand, and then do it by hand.
Axuer can be used to take mockups/prototypes and export as HTML/CSS: http://www.axure.com/
I only ever used it for prototyping.
There are no apps that will make it a css3, they apps that exist will give you a lot of image sprites and css2 and a lot of bugs you have to fix manually :/
So suggest coding it manually or hiring someone who does it(Kinda cheap these days even I would do it if I get paid well enough)

Is there a "best" way to edit CSS? [closed]

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.
Is there a "best" way to edit CSS?
I'm looking for a designer tool. It has to "visual"... less code.
Visual studio does a good job but it seems to be lacking when it comes to the actual design stage.
My suggestion is CSSEdit by MacRabbit. It's focused on just editing CSS, and is very visual without hiding code. You can edit CSS attributes through a GUI, or directly edit the text in the code. You can preview your work on any site, even applying your edited CSS to the display of live Web sites. As a plus or minus depending upon your platform of preference, it's a Mac only application.
Here's what I do:
Design the page semantically, using lists, headings, paragraphs etc.
Add classes and ids where appropriate.
Open the unstyled page in Firefox.
Open Firebug.
Write/edit the CSS there and see the results instantly.

Does anybody know of a CSS analysis tool? [closed]

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'm looking for a tool that can analyze a large site and look for orphaned css.
I work on this project that has gone through a couple of UI updates. Scrapping the whole thing and redoing it all would take forever. What I would like is a tool that reads a css file and then lets you browse the site, keeping track of what definitions were used and how often.
Then I can go through the css file and find code that I did use and determine if it is indeed deprecated and can be deleted.
Thoughts?
Firefox has a great extension called Dust-Me Selectors for flagging up classes/ids that are not used on the current page.
There's also TopStyle, which promises to help you do the following (I've not used it, and can't vouch for it though):
Preview CSS while you write it.
Easily create pleasant color schemes for your site.
Style Checker validates your CSS syntax against multiple browsers.
Use Site Reports to see at-a-glance where CSS styles are used in your site.
Style Upgrade quickly replaces all outdated HTML code with equivalent CSS styling.
Internet Explorer 8 has this feature called Developer Tools which can help you with that. You can read about it from the IEBlog entry. If you don't have IE8 you can download the toolbar from here.
I would suggest CSSEdit. Been using it for years. Has an inbuilt validator and an x-ray inspector.

Resources