Frames in HTML5 [closed] - html

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
My girlfriend is making a website for her exam.
She is not good at HTML - at all! (Me neither). But for making it easy for her, I told her to use frames. It's easy and manageable.
But the problem is that the website have to live up to the standard HMTL5. That's a requirement. I don't think frames does that because it's deprecated. Am I right or wrong?
So.. What to do? It has to be as simple as possible. I don't think the other solutions I could find are something she can do herself :( Any ideas?
(Sorry, if my english sucks :) )

You should definitely try not to use deprecated elements. They will behave inconsistently, and probably won't work in the future. There's also a very good reason why frames are deprecated.
You probably need to rethink how you're structuring your data. An HTML page should be as simple and to-the-point as possible. If you have to pull in a significant amount of content from other web-pages using frames, you're doing it wrong. In most cases it's better to simply link to the extra content.
If you're trying to use frames to pull in the <header> or the <nav>, so you don't have to simply copy them across multiple pages, although I applaud you for trying to be DRY, this is the wrong way to do it. Just copying these sections into all your documents is a better solution than using frames.
Ideally though, you'd use a server-side templating system of some sort. The simplest one (depending on your setup) may be Server-Side Includes.
Having said all that, if you really need frames, the <iframe> element is perfectly valid in HTML5 and may help you out.

Don't use frames, very old and not needed at all
Make sure all your style stuff is made in CSS and it's loaded through a CSS file.
Then make each html page with the information needed in it. Use links for navigation to another page.
With the external CSS you can change the look of your site in one file (the CSS file), and it will automatic update for each html page.

You are correct in assuming that frames do not conform to the HTML5 draft (to the extent that it makes sense to speak of conformance to a draft). HTML5 is not a standard, though it may one day become W3C Recommendation. It does not use the term “deprecated” but “obsolete” and “non-conforming”, but in any case, frameset and frame elements do not conform.
The iframe element (“inline frame”) conforms, however. Using it instead of “normal” (old-style) frames is clumsy and limited, but possible to some extent.
I think this answers the specific, on-topic questions asked. The rest is mainly opinion-based and hence off-topic at SO.
P.S. If “living up the the standard HTML5” is a requirement, then the teachers would need a crash course on the basics of HTML5 process. The requirement means that a page that is “standard HTML5” in the morning may become non-conforming before lunch. After all, HTML5 is a draft that may change at any moment without prior notice, and it says itself: “It is inappropriate to cite this document as other than work in progress.”

Related

Embeding a website into your own website using your own css? [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 6 years ago.
Improve this question
I use a website that recently changed its layout, which I (and a lot of other people) extremely dislike. I checked over the changes, and I believe that most of the changes involve a simple css change.
I own a domain that I would like to display the contents of this website, but with my own css, however I am unfamiliar with the web. I am open to all solutions that would do this (embedding, reflecting, etc.) I would like to do this without paying money.
*Note: the reason I am avoiding using a userstyle is because I would like to be able to access this website on any computer, anywhere, anytime, and let others do the same.
The website in question is http://www.scarsdaleschools.org/, and I would like it to look like this.
I know there might be some conflicts with the using the old css on the current website, it is okay as long as it is usable.
I will give an additional 50 point bounty if the solution does not involve me hosting my own website.
Clarification: I am not looking to create a mirror for the website, I would like a client to access scarsdaleschools.org directly, only replace all css documents with my own css, thus all content is accessed directly from scarsdaleschools.org.
EDIT: This was put on hold as too broad. I am looking for a method by which I can accomplish what I am trying to do.
According to the help center:
There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow down the answer set or to isolate an issue that can be answered in a few paragraphs.
Chances are, there is probably only one way (or a small few ways) that can answer my question. Regardless, my question does not require a few paragraphs, but just a simple name of a technique (and hopefully a small explanation of how I would use this technique).
Well if you don't mind having to put some insane amounts of !important in your CSS for it, the iframe tag is actually powerful enough to do it (doesn't even need the proposed-then-cancelled seamless attribute).
I'd still suggest using something like a portable browser on a flashdrive/CD, and having your userstyles installed on that, instead, as it's a little less red-flag-inducing (your site may be flagged as a potential attack site w/ the iframe trick). Added bonuses, it dodges corpsec spyware and update restrictions, and has all your bookmarks/addons.
But simply iframeing the website from your own with your stylesheet (loaded with !importants) will suffice, so long as you can get around any framekiller they use (if any).

HTML: Cons and whats adverse about Illegal HTML (Why is it bad)? [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
In a fully working website, with the looks and functions working just the way a client wants BUT loaded with tons of illegal HTML...what are the adverse effects of those illegal HTML?
My question might seem a bit simple, but I am trying to look beyond the obvious...Nowadays, web browsers ignore (or correct) illegal HTML. Is there a SEO penalty, or some other kind of problems besides slower loading time?
Aside slower loading time, making fixes on such page by another developer/designer might take unnecessary long time for such person to understand the flow.
Also, come to think of a situation when you jQuery to 'backdoor' pick-up (or inject) some elements on (or into) your page, this can also lead to BIG bug.
There is no harm in proper planning of tag usuage and lots.
super!
A big reason is to help you be sure that it will render correctly in different browsers and be understood correctly by other html readers, such as web crawlers.
Whilst HTML5 has increased specification for standardized error handling, that is still not going to guarantee that it will appear exactly the same to every browser, and there are increasingly too many browsers to test them all.
Also, good code is not just about validation but about semantic markup. Letting search engines know what your content is by the correct use of markup can only help your site be understood correctly by the search engines, which is what SEO should be.
Browsers will, as always, try to correct badly written HTML. The problem is that different browsers will "correct" the markup in different ways. Some may get it right, while others will fail in more or less subtle ways. Badly written HTML (and also CSS and Javascript) may result in:
important content disappearing from the page,
overlapping or unreadable content,
forms that cannot be submitted,
missing form elements,
dead links and buttons,
the author looking like an ass.

Can tables be used for layout now that accessibility options exist? [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
On the W3C page on HTML tables, there is a line, "Tables should not be used purely as a means to layout document content as this may present problems when rendering to non-visual media [such as screen readers]."
We can understand this requirement because screen readers have had to parse HTML content on the page and make sense of it. This makes sense as accessibility was not defined in the before times, in the long long ago. But now, we have accessibility tags which were created to describe the data to screen readers and ignore the layout.
If you defined accessibility on your web page would it matter if you are using tables or CSS?
Basically, I would like others to explain to me that, "...it is or is not OK to use tables or CSS or JavaScript or whatever to layout your content as long as you add accessibility tags".
I say layout the page with JavaScript because we are in the age of RIA and the page can be updated dynamically with JavaScript without refreshing (see WAI-ARIA).
WAI-RIA is the Accessible Rich Internet Applications Suite, defines a
way to make Web content and Web applications more accessible to people
with disabilities. It especially helps with dynamic content and
advanced user interface controls developed with Ajax, HTML,
JavaScript, and related technologies.).
Update
For the record, I should have mentioned this earlier, but I don't plan to use tables for layout. But mainly I wanted to know if I could. I wanted to know if the advancements we've made in accessibility made it possible to use tables willy nilly, if we wanted without repercussions.
I found this related post, which I think is different than my question but there are some good answers (though out of date and the topic is locked down).
In short, it is (and has always been) possible to use tables for layout with little or no accessibility impact. However, you are making more work for yourself.
If you use a CSS layout with divs, sections, main etc. you only need to think about ARIA landmarks for accessibility.
If you use tables for layout, you have to consider nullifying the table roles, then adding HTML5 semantics and landmarks.
NB: ARIA is not intended to replace regular HTML semantics, it is intended to add semantics for applications that are not (yet) supported by HTML. Oh, and there are no "accessibility tags", but HTML does include tags that help with accessibility, and ARIA adds attributes that help describe functionality.
Quite a good question and I'm sure you'll get a lot of opinions on it.
Personally (the way the standard currently is), tables should only be used for tabular data. You can use CSS to display as 'table', 'table-cell' etc, so could easily mimic this display method with div tags. But browsers expect data within a table rather than layout.
However, the one exception I would say is that e-mails should be laid out using tables :)

Deprecated tags and attributes? [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 10 years ago.
Improve this question
Upon visiting an older site it can be common to find deprecated tags and attributes. Yet as the are deprecated and not obsolete, they are still valid and supported. A 'good' programmer tends to stay away from these if at all possible, yet just how bad is it to use these?
Upon looking up information about deprecated elements, I find the most common information supplied is:
Browsers should continue to support deprecated tags and attributes,
but eventually these tags are likely to become obsolete and so future
support cannot be guaranteed.
Obviously if something breaks you should change it. Yet should we actively change instances of deprecated elements in code we had worked on previously? Either a personal site, or a huge site with a huge view rate, just how important is it to stay as up-to-date on accepted elements?
How much warning after a tag or attribute becomes deprecated is given when it is decided it will become obsolete? Any? What about other web formats?
On any site, be it an over-haul, or just noticing a line of deprecated code, should it all be actively removed? Or is it worth the saved time and energy to just wait until is is truly dropped and change it all at once?
Should you lazy (like I wish I could be), or is it worth the effort to be that up-to-date?
Should you just be lazy (like I wish I could be), or is it worth the effort to be that up-to-date?
It's always important to be lazy, that's why we have tags marked as deprecated instead of just removed.
I always tell developers to be lazy, but only lazy enough to not stop yourself from preventing yourself from doing good things. There's such a thing as too lazy, and such a thing as not lazy enough. DRY is an example of good lazy. Relying on deprecated tags is an example of bad lazy. Using divs for table layout is an example of inefficient overwork.
On any site, be it an over-haul, or just noticing a line of deprecated code, should it all be actively removed? Or is it worth the saved time and energy to just wait until is is truly dropped and change it all at once?
If you're doing maintenance, and it's a bug report, it's always important to fix it, obviously, but in the case of being proactive, the question becomes, what's the most important thing for you to do right now. If you have some 20% time and you want to fix it, then fix it. If you have tasks that need to be done, then you need to focus on those first.
Either a personal site, or a huge site with a huge view rate, just how important is it to stay as up-to-date on accepted values?
This is really what you're asking about. On your own personal site, that's definitely 20% time, so do that as you want.
On a massive site with lots of throughput, you need to try and keep it up to date so it continues to offer good benefit to the users. If the site suddenly stops working for lots of users, they're going to stop coming. Then a massive site with lots of throughput turns into a dead site taking up space on the internet.

why do people still use tables, inline css, 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 8 years ago.
Improve this question
When you learn HTML and so forth nowadays, the mantra is always "Clean code = better code".
So why do sites like Mobile Me and Google and Facebook all use huge amounts of tables and other not-semantically correct code?
Thanks!
Because people still use IE6, unfortunately, and it's so incredibly bad at CSS as to make it almost worthless for CSS selectors of any sophistication. Until IE6 is gone and dead dead dead in the cold ground, you're still going to see a lot of this.
If you could see what SharePoint generates, you would probably go into seizures.
Clean code is better, yes.
But working code is much much better )
Because sometimes that's the path of least resistance. It's not always about being ideologically pure, it's about being pragmatic and getting the job done in this crazy, multi-browser, multi-platform world.
Because it's easier.
While the purist in me will also strive for semantic tags and external CSS for layout, the pragmatist in me need to get this site up by 6pm (so I can go home to my wife and a nice warm dinner!) and there's just this little problem with [insert browser here*] that could easily be solved with a bit of conditional CSS, or a table or something.
There are other reasons for high-traffic sites like Google and Facebook to use inline CSS and js: bandwidth. Every external file you reference is one extra round-trip to the server to fetch. Of course, that doesn't really explain the style="xxx" tags as opposed to just inline <style> tags, but it still reduces the size of the page. Also, while caching does tend to reduce the number of trips, there are still a significant number of requests that are made with a "clean" cache that you still want to optimise for that case.
Not always IE (but mostly is)
I had an affiliate marketing client the other day who wanted me to make him a web template where he could go in and edit it with Adobe Dreamweaver (some app I don't use because I'm a Linux user). So, being the web-savvy guy I am, I did it in XHTML with cross-platform CSS that I have learned over the years, using DIVs primarily, and only using TABLES for form field alignment simply because of the 80/20 rule. It was lean code in as few lines as possible, loaded super fast, and worked on all browsers from IE6 on up.
But then I handed it off to him, and he was visibly frustrated and asked me to make changes. He didn't like the CSS because he couldn't cut and paste sections to another page and have the styling carry over. Instead, he wanted me to switch everything to inline styles. Next, he couldn't edit the floating DIVs very well, and would undo my cross-platform work I had done, so he wanted it reverted back to tables. The end result was XHTML + CSS for the shell of the page that centers everything into the middle and adds the fancy graphics around the page. Then, I used PHP "include" separation for headers and footers. The final part was the middle of the page, and that was his domain. I had to compose it in TABLEs with inline styles. At that point, he was happy and I had a compromise.
So, keep this in mind that there are some cases where you have to use TABLE formatting and inline styles because that's all the client really knows how to manipulate.