Is Viewing HTML Source Code Legal? - html

For learning purposes I want to view the html source of sites like amazon.com, ebay etc , After learning I want use it in my work, I don't want to copy and paste the html source.
Points to consider:
1. Hiding html source is unprofessional, here
2. Viewing HTML Source is safe for developers, here
3. All working web professionals do it for learning, here
So can i View HTML Source to learn css styles etc ? or should I get permission from website's owner ?
Any help would be great.

Client side code is always accessible publicly, viewing it or using it for learning purpose is absolutely fine. There is nothing illegal to that. However, if you are using the design of the any website or the part of website such as java-script or css, there should be a copyright notes; just read that once before using it. I don't think all java-scripts and css may have the copyright issues and you can also read the website policy before using it.

That depends.
If you live in the USA and circumvent a copyright protection system (however badly implemented) while viewing and using source code you broke the law. There are many other ways to break the law by misusing other peoples websites (like scraping, leaching, mirroring, hacking, etc). Search for "laws you break every day" and you will see how hard it can be to not break the law, but the rule of thumb is be a nice small fish and likely any laws you break people wont care enough to charge you with.

You can read a source, but you shouldn't use it if not allowed. If the source has a license, you should read it to know.

The HTML/CSS/Javascript code is loaded in your browser and you can watch it as many times as you want without any concern.

yup, it is 100% legal to view and use

Related

how to attribute code from a website?

I found a website useful for designing my own site and took parts of the code to modify it for my personal use.I have added my content but parts of the html and css are from this original website.
do I attribute the work by providing a link to the original developer's page ? I've done so under the footer but was wondering if more is required to give proper credit.
You do so in whatever manner the license they gave you to use their code says you should, and you should ask the copyright holder if it is unclear.
Legally? It depends entirely on the license that the original author has decided to publish their work under. There are a multitude of open source licenses each with slightly different attribution and reuse requirements (even Stack Overflow)
Morally? That's entirely up to you. If you're using a substantial amount of code, a callout on the page may be appropriate. Maybe just a comment will do. Or maybe no attribution at all if the license (and your conscience) allows it.

Website Update Tool for a Non-Programmer

I work with my professor to implement web-based decision support tools. I am a seasoned programmer, and am at ease with the various web technologies we use. However, my professor isn't, and he usually has to rely upon me to do even the most basic tasks like adding publications and presentations to an existing list. However, he now wants to be able to do these basic tasks by himself since we both feel it will be more efficient that way, and to leave the hard-core tool implementation for me.
He suggested that we purchase Dreamweaver to achieve this. However, I do not have much experience with Dreamweaver since I prefer to work with bare HTML, CSS etc., and Emacs and Eclipse have filled these needs very well for me.
What do you think we should do? Do you think Dreamweaver will be a good tool for this? If not, is there something else we should look at? How far will he be able to get along without knowing much HTML? Do you think I should give him a crash course in HTML? Feel free to opine!
NOTE: The website is not based on any CMS; it is completely bred in-house. We use HTML, CSS, PHP, and JavaScript. However, my professor will most likely dealing only with HTML (no CSS etc.)
For these types, I often (while cringing) reach for WordPress.
If your customers can make a Facebook post, they can edit content in WordPress. Just stay on top of the updates for it, as exploits for WordPress are found with very high frequency. Even with this maintenance, it will still be easier than doing updates for them.
It shouldn't be too hard to convert your site over to a template that you can use within WordPress. If you can't, you can easily embed content from WordPress into your site via feeds, but there is a performance penalty for this.
If you build the site with Dreamweaver, Adobe Contribute is a good option that is pretty much WYSIWYG (what you see is what you get), and it is designed to work with Dreamweaver templates.
Basically, it helps prevent novices from screwing up the site too badly by locking users out of template areas (the areas that are supposed to stay the same from page to page, such as navigation).

Focussing on Style Sheets and Cross Browser Compatibility

Let me begin this topic by explaining my background experience with web design. I have always been more of a back end programmer, with PHP and SQL and things. However I do have a shallow background with HTML and CSS. The problem is, I don't know it all. What I do know is, when it comes to designing (not back end dirty work) I understand basic CSS properties and I also understand HTML and I can usually throw together a sloppy web page with the two and a couple bazillion DIV tags.
Anyways..
The problem I always have encountered is that when I design a website in a browser such as IE7 (and then it looks perfect on IE7), and then look at it on IE8 or IE6 or Mozilla (etc.) it gets all spacey and ugly and looks totally different than the way it should look on IE7.
Question one:
Basically, what I am asking everyone is what route should I take to learn how to properly build the website? Build as in put it togehter with CSS standards and HTML standards that will make my site look the same on every brwoser. (Not only learning standards but where can I learn to properly write my code?) Where is a strong free resource I can use to learn how to these things?
Question two:
How do I properly code my website? Do I use all external style sheets to make dynamic page design simplistic or do I hard code some things into the DIV tags on each page? What is proper?
Oh, and if anyone has any tutorials on how to properly design a complete layout feel free to throw it in a response somewhere.
Thank you for taking the time to read my questions, and hopefully you will understand what I am trying to get out to everyone. I need to get on the right route of the designing side of web programming so that I will know how to create successful websites in the future.
Thank you,
Sam Pardee
First, I recommend NOT starting with IE as your "development" browser. Start in Firefox, say (which gives you the advantage of tools such as Firebug and the web developer toolbar), and then get it right in IE afterwards.
Second, definitely user external style sheets; it results in much cleaner code and a much simpler way to make style updates. Definitely recommended. Also external CSS files can be cached by the browser, so they won't increase the page download size as users go from page to page in your site or application.
Lastly, start by defining your content using simple HTML, basing the structure on the meaning of the content (often called "semantic" HTML), not on how you want it to look. Use a <ul> tag for something that is a list of items, for example, even if you don't want to display it as a "bullet list" (the default styling for <ul>). Then start adding styles to make it look right. This will result in very clean HTML that can support a variety of formats and layouts (take a look at CSS Zen Garden to see what I mean) and will also help push you towards a layout that reflects the structure of your content, which will be easier to read and comprehend.
In terms of books, you can't go wrong with Eric Meyer. HTML is easy, of course, and I don't recommend doing fancy stuff with HTML, so put your learning effort into CSS (Eric is the CSS guru).
Cross-browser compatibility is always an issue. It's a staple of web development, sadly, and there is no magic bullet. Luckily, the main offender, IE6, is finally starting to fade.
A1.
When starting work on a new site, first take every piece of content that needs to be on the page and paste it into a text file. Then put it in a rational order (thinking "If I had to use a text browser to use this page, how would I want it to be arranged...").
Then start wrapping HTML tags around each piece of content. For each piece, think "What type of information is this?" A heading? h1/h2/etc tags. A paragraph? A quote? A table? p,quote,table. Essentially, use HTML tags that describe what kind of information each piece of content is. When I do this, I pay no attention to how it actually looks in the browser at this point.
Once the content is all marked up, begin writing the CSS. If at all possible, try not to touch the markup during this step. Sometimes that isn't possible, though, and throwing a div or span around some elements is unavoidable. The less meaningless markup, the better.
In my experience, this approach keeps things very clean and tidy, and makes debugging layout issues a lot easier.
A2.
Building the styles into your markup using the "style" attribute is fine for prototyping, but beware, the temptation to leave them there once it works is strong. The best practice is to have all of your styles in external stylesheets. I'm interested to hear any alternative viewpoints.
Some great web standards/CSS resources:
http://www.csszengarden.com/
http://www.alistapart.com/
http://www.thenoodleincident.com/
http://www.quirksmode.org/css/contents.html (useful reference for selector-compatibility)
http://centricle.com/ref/css/filters/ (good reference for css hack compatibility)
http://www.zeldman.com/
http://meyerweb.com/
Hope this helps!
There are TOO many site out there that have really great tutorials for HTML and CSS. They will give you all of the information you are asking for. I would start doing some reading of the great gurus of HTML/CSS:
Simon Collison
Andy Budd
Molly Holschzag
Dan Cederholm
Jason Santa Maria
Eric Meyer
Jeffrey Zeldman
Cameron Moll
Any book or article you can fond from these folks will steer you in the right direction; you can't go wrong!
As for sites that will give you the proper methods/concepts/training for web standards compliant sites:
http://www.w3schools.com/default.asp
http://www.webstandards.org/
http://www.smashingmagazine.com/
http://www.webdesignpractices.com/
http://www.designmeltdown.com/default.aspx
http://www.cameronmoll.com/
http://www.alistapart.com/
http://www.cssnewbie.com/
http://www.css3.com/
http://htmldog.com/
http://css-tricks.com/
http://simplebits.com/
http://www.colly.com/
http://glish.com/css/#tutorials
http://meyerweb.com/
http://jasonsantamaria.com/
The one of the best books I've bought so far to help with HTML and CSS coding PROPERLY is Beginning CSS Web Development by Simon Collison. Great, easy to understand, and not too slow. Great examples to follow along. After that, buy CSS Mastery - Advanced Web Standards Solutions, also by Simon Collison, and Andy Budd and Cameron Moll. This book gets you up to speed with some advanced techniques that you'll see on the many of the web sites right now, some of which were invented by the authors.

Why shouldn't professional web developers use Microsoft FrontPage?

I have a workmate with access to a very good IDE. He wants to use Microsoft FrontPage to write his jsps.
I know exactly what I want to say to him, but what would you say? I need a concise reason why a professional web app developer would never consider FrontPage.
It's an unnecessary abstraction for professional web developers, who need very tight control over the HTML and CSS generated.
It would be like rally car drivers using an automatic transmission. They need to know exactly what their car is going to do, and web developers need to know exactly how their code is going to act.
#1 reason:
FrontPage was discontinued in late 2006.
Personally, it bugs me seeing the extra bloat (unnecessary HTML structure, non-semantic use of HTML tags, embedding CSS directly in HTML) that Frontpage generates. I also dislike use of proprietary, non-standard HTML and CSS. Frontpage's code bloat is bad enough to have inspired such programs as Frontpage Code Cleaner. Here's another Stack Overflow question that deals with removing Frontpage bloat: FrontPage tags - Pain in da HTML.
You might also check out Why I do not use Frontpage by Greg Moreno.
Frontpage leads to bad habits for some of the same reasons Sarah Vessels lists. I used to use it myself. I was one of those who liked to design in design mode and refine in HTML. The problem was that switching between "design" and "html" views would cause FrontPage to change my precious HTML. And at some point I got fed up with it destroying my markup (something the newer tools are better about not doing).
When I began hand coding every site I worked on from scratch I learned so much more about HTML and CSS in general and how to make lightweight, efficient pages. And at that point I also realized that the markup FrontPage would generate was really old-fashioned with lots of tables and inline CSS. As I learned to do it right I also learned how to make my sites cross-browser compatible on the first try. In the end this allows me to design and build a better site, faster.
Professional web developers should really avoid Frontpage and use Microsoft Expression Web instead. It's the replacement for Frontpage and is fairly good, actually.
Frontpage itself has been discontinued. Using it simply as an HTML editor with syntax highlighting is a bit silly given how heavyweight it is.
That being said, if he's producing good code and delivering on time, it doesn't really matter what he uses.
It's intentionally dumbed-down
Great web developers build sites that:
Look good in all browsers
Degrade gracefully when Javascript or CSS or a plugin is not available
Have semantic HTML that makes sense to screen readers
Use AJAX, content compression, and caching to minimize bandwidth use
Have lovely, pixel-perfect graphics
If any GUI can do all that reliably, great. But I haven't seen it yet. And by the time you build one, the competition will be hand-coding capabilities that the GUI doesn't know about yet.
For one, FP isn't really supported anymore. The FP extensions honestly suck, they break quite often on the server side. But just as HTML editor, when the latest FP version is used and the settings are right (correct browser version and no server-side FP extensions), it's quite OK.
However (if staying on MS products), I'd rather use Visual Web Developer 2008 (o1 2010 when it gets out), it's free and has more recent technological support.
This is going off topic, but when FrontPage first came out, it was groundbreaking in how easy it was to create websites at a time when the web designer title was nowhere near fruition, but of course, FP has (de)volved into producing bloat.
The original company that created it was named Vermeer, after the Dutch painter and the story of how FP was built and how Vermeer got bought out by Microsoft is an interesting read, giving you insight into startups and Microsoft buyout tactics back then.
The same person who founded the company produced the movie, "No End in Sight", a documentary about the escalation into Iraq. Interesting segue, from software company to documentary movies.
Anyways, I think the name is Charles Ferguson. You can probably find a used version of the book on the cheap in Amazon. Definitely a worthwhile trip in the way back machine.
Because it's supposed to be catered to the crowd that isn't familiar at all with web development, mostly novices. To an experienced web developer it's fairly restrictive and limited, as is any WYSIWYG editor.
I haven't used it lately, but it used to rewrite a file with it's own garbage, even if you didn't save the file.
The same reason a professional artist doesn't use a coloring book. You're being paid to bring your skill and expertise into creating a product — using only FrontPage is essentially shirking that duty. I'm not saying it's never OK to touch it, but you need to take responsibility for the code you ultimately produce.
I personally haven't used Frontpage all that much, but I feel that you should really learn to use HTML and CSS and not rely on an application to do it for you. You really learn how things work and you have more control over what goes on.
It's Microsoft's
...the same company that brought you IE 6. I bet your site will work with IE 6, but will it work with Safari and Firefox and Opera equally well?
And if it doesn't, what are you going to do about it? You didn't want to dig into the code, remember?
Frontpage produces terrible code that won't be maintainable by other developers not using frontpage, meaning almost all web developers with common sense - especially since Frontpage got discontinued.
As mentioned - FrontPage became Expression Web. I hated FrontPage, but I think Expression Web is fantastic. I'm a programmer with deliverables, I don't have time to mess arround writing HTML code myself.
I suppose it depends what market your friend is in. If he wants to make shiny, glossed up websites with custom features & CSS - use a HTML/CSS syntax editor.
If he just wants to make quick, nice looking, clean corporate sites and have a high turn-over of generic sites, Expression Web is great. (The HTML isn't very 'pure' thought - but honestly what client would care?)

REALLY Simple Website--How Basic Can You Go?

Although I've done programming, I'm not a programmer. I've recently agreed to coordinate getting a Website up for a club. The resources are--me, who has done Web content maintenance (putting content into HTML and ColdFusion templates via a gatekeeper to the site itself; doing simple HTML and XML coding); a serious Web developer who does database programming, ColdFusion, etc., and talks way over the heads of the rest of us; two designers who use Dreamweaver; the guy who created the original (and now badly broken) site in Front Page and wants to use Expression Web; and assorted other club members who are even less technically inclined.
What we need up first is some text and graphics (a gorgeous design has been created in Dreamweaver), some links (including to existing PDF newsletters for download), and maybe hooking up an existing Blogspot blog. Later (or earlier if it's not hard), we may add mouseover menus to the links, a gallery, a calendar, a few Mapquest hotlinks, and so on.
My question--First, is there any real problem with sticking with HTML and jpegs for the initial site? Second, for the "later" part of the site development, what's the simplest we can go with? Third, are there costs in doing this the simple way that will make us regret it down the road? Also, is there a good site/resource where I can learn more about this from a newbie perspective?
­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
If you don't require any dynamic content, heck, if you don't plan on editing the content more than once a week, I'd say stick to basic HTML.
Later, you'd probably want a basic, no-fuss and easily installable CMS. The brand really depends on the platform (most likely PHP/Rails/ASP), but most of them can be found by typing " CMS" into Google. Try prefixing it with "free" or "open source" if you want.
I'm pretty sure you can do all this for absolutely free. Most PHP and Ruby CMS's are free and web hosting is free/extremely cheap if you're not demanding.
And last/best tip: Find someone who has done this before, preferably more than once. He'll probably set you up so you never have to look at anything more complicated than a WYSIWYG editor.
Plain old HTML is fine, just as long as you don't use tags like blink and marquee.
I personally love tools like CityDesk.
And I'm not just plugging Joel. (There are others out there in this class I'm sure.) The point is they make making a static website very easy:
The structure is just a filesystem structure
pages have templates to consolidate formatting
all resources are contained in one file
easy and fast Preview and Publish functions
For a dynamic collaborative site, I would just install one of many open source CMSs available on shared hosting sites.
If you're familiar with html/javascript basics I'd look into a CMS - wordpress, drupal, joomla, nuke, etc. All of these are free. Very often your web hosting company will install one of these by default which takes all of the hard part out of your hands. Next is just learning to customize the system and there's tons of docs out there for any of those systems.
All that being said there is noting wrong with good old fashioned html.
In addition to some of the great content management systems already mentioned, consider cms made simple.
It makes it very easy to turn a static site into a content managed site (which sounds like exactly what you might need to do in the future), and the admin area is very easy to use. Our clients have found it much simpler to use than the likes of Joomla.
It's also free and open source.
Good luck!
There's no reason to not go with plain old HTML and JPGs if you don't know any server side scripting languages. Also, once you want to get more advanced, most cheap hosting services have tools that can be installed with one click, and provide things like blogs, photo galleries, bulletin boards (PHPBB), and even content management tools like Joomla.
I had the same problem myself, I was just looking for something really easy to smash together a website quickly. First I went with just plain old HTML, but then I realised a simple CMS would be better.
I went for Wordpress. Wordpress is mostly known as a blogging platform, but in my opinion it is really great as a deadly simple CMS as well.
why not simply use Google pages?
Here is an example of a website I did, takes about 2 hours, easy to maintain (not that I do (-: ) and FREE.
I think that suggesting you mess with HTML for what you need is crazy!
Plain HTML is great, gives you the most control. If you want to make updating a bit easier though, you could use SSI. Most servers have this enabled. It basically let's you attach one file to many pages.
For example, you could have your menu in navigation.html and every page would include this file. That way you wouldn't have to update this one file on every page each time you need to update.
<!--#include virtual="navigation.html" -->
I agree with the other commenters that a CMS might be useful to you, however as I see it, probably a solution like Webby might do it for you. It generates plain HTML pages based on Templates. Think about it as a "webpage preprocessor" which outputs plain HTML files. It has most of the advantages of using a server-based CMS, but without a lot of load on the server, and making it easy for you to change stuff on any of the templates you might use.
It's fine
Rails (or purchase / use a CMS)
Not unless you start becoming crazy-popular
It really depends on what you go with for 2. Rails has a plethora of tutorials on the net and any product you go with will have its own community etc.
To be perfectly honest though, if the dynamic part is someone elses blog and you move the gallery out into flikr you may find that you can actually live with large parts of it being static HTML for a very long time.
If a to Implement a website With User Profiles/Logins, Extensions, Gallery's etc s a Newbi then a CMS like Joomla, Etc are good , but Else if you presently have only Static Content then Its good to go with Good Old HTML, About JPEG , I though Presently Its better to use PNG or GIF as its Less Bulky.
Also About you Query About Shifting to Server Scripts , When you have Database Driven Material or When you have Other Things that Require Advanced Prog Languages , Just use PHP Scripts inside PHP , and Rename teh File as a PHP, Thats IT, No Loss to you HTML Data.....
Do Go Ahead and Launch you Site ......
Dude, you're talking about HTML, obviously you'll be styling your content with CSS. Wait till you run into IE issues and god forbid your client wants ie6 compatibility.
Go with the HTML for now, I'm sure you guys will hack it through. Our prayers are with you.
Personally, I'd never use JPEG images on a website, mainly because of three reasons:
JPEGs often contains artifacts.
Quality is often proportional
with filesize.
Does not support
alpha transparency.
That said, I'd recommend you to use PNGs for images since it's lossless and a 24-bit palette (meaning full colors + alpha transparency). The only quirk is that IE6 and below does not support native alpha for PNGs, however this could be resolved by running a javascript which would fix this issue.
As for designing a website, there's both pros and cons for this. I suggest you read through:
37 Signal's Why We Skip Photoshop
Jeff Croft's Why We Don't Skip Photoshop
As for newbie resources, I'd recommend you flip through the pages at W3 Schools.