DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
The Latest "Software Integration: The Intersection of APIs, Microservices, and Cloud-Based Systems" Trend Report
Get the report
  1. DZone
  2. Coding
  3. Languages
  4. HTML5 vs. CSS3 vs...background-image?

HTML5 vs. CSS3 vs...background-image?

John Esposito user avatar by
John Esposito
·
Nov. 17, 11 · Interview
Like (0)
Save
Tweet
Share
6.17K Views

Join the DZone community and get the full member experience.

Join For Free

HTML5 has superpowers, and CSS3 styles on steroids. And maybe HTML5 really will blow up your world. But what if your job is pretty simple, and maybe doesn't need these newfangled standards?

The fact is, plenty of tools are too powerful for the job. Sometimes building for the distant future takes too long -- though figuring out how to juggle the short and the long terms can get tricky.

So while there's no question that Canvas and CSS3 can do anything CSS 2.1 can, the question is -- do the newer technologies always do it better?

Not always, says Jef Vlamings.

His test-case? Slightly odd-shaped navigation tabs -- rounded rectangles, with a triangular left edge.

Jef first found himself seduced by CSS3's siren-song, and tried ten lines of CSS3 -- which almost worked, but left the left (triangular) border incomplete.

Then he tried HTML5 Canvas -- which worked beautifully, but took 40 lines to write.

Finally, he just clipped from a Photoshop prototype and used an old-fashioned background-image, and it worked perfectly in every browser.

The lesson, Jef declares, is this:

Sometimes you neglect the easiest things when you are getting too ambitious. New technologies are invented for a reason and if you don’t have a clear understanding of that reason, you end up making it yourself too complicated. Lately, the use of CSS3 and HTML5 is booming in the web design sector. For almost each task, designers find some way or another to implement CSS3 or HTML5 because it’s the latest thing. Sometimes it’s overlooked that older proven techniques are just better for the job than the new fancy stuff.


Pretty zen, I'd say, but that's a nice thing for CSS to be.

Check out the full discussion, which includes screenshots of the results reached by each approach.

CSS HTML

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Create Spider Chart With ReactJS
  • What To Know Before Implementing IIoT
  • MongoDB Time Series Benchmark and Review
  • Keep Your Application Secrets Secret

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: