Stories
Slash Boxes
Comments

SoylentNews is people

posted by martyb on Tuesday July 02 2019, @04:39PM   Printer-friendly
from the lawns dept.

"Front-end" developer, Pete Lambert, writes about why front-end "web" developers should start to learn HTML. More and more developers are using only pre-made frameworks and quite unfamiliar with the fundmentals of the technology they are using, such as semantic markup. He notes that the continued failure to pay attention to the basics of semantics is slowly breaking what's left of the World Wide Web and suggests reasons to correct that and has some pointers to learning resources.

I’m a ‘frontend of the frontend’ kind of guy. My expertise is in HTML and CSS, so it’s easy for me to wax lyrical about why everybody should learn what I already know (for the record, I don’t know it all - we still have heated debates in the office about what the best way to mark up a certain component might be). This isn’t about ‘my job’s more important than yours. If you’re writing code that renders things in a browser, this is your job.

It’s about usability and accessibility. If you don’t think the semantic structure of your Web page or app is important then you’re essentially saying “Well, it works for me in my browser, ship it”. I don’t think you’d do that with your Javascript and you certainly shouldn’t be doing it with your CSS. Search engines need to read your content, not enjoy your swoopy animations or fancy gradients. Screen reader software needs to read your content. Keyboard users need to read your content. Who knows what technology will come next and how it will consume your app but I’ll bet my bottom Bitcoin it’ll work better if it can easily read, parse and traverse your content. The way these things read your content is that they know it’s actually content and not just strings of text wrapped in meaningless tags. They know what’s a table and how to present it, they know what’s a list and how to present it, they know what’s a button and what’s a checkbox. Make everything from divs and they’re going to have to work bloody hard to figure that out.

Earlier on SN:
How to Build and Host an Energy Efficient Web Site (2018)
Conservative Web Development (2018)
Dodgy Survey Shows 1 in 10 Believe HTML is an STD? (2014)


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 3, Insightful) by Thexalon on Tuesday July 02 2019, @08:21PM (2 children)

    by Thexalon (636) on Tuesday July 02 2019, @08:21PM (#862514)

    It is all the code that you don't have to update across all files

    There are plenty of times I've been able to get a lot of mileage out of the following extremely complicated PHP snippets:

    <?php include('header.php'); ?>

    ...

    <?php include('footer.php'); ?>

    and still code most of the site in simple HTML / CSS / JS and runs extremely quickly.

    Once you learn a certain CMS it is almost always easier to build a site with it.

    You seem to think that my defense of hand-coding is due to my lack of familiarity with CMS's. It's not: I'm good enough at both Wordpress and Drupal to get paid good money to fix other people's foul-ups with them (and less frequently, create new sites and/or add new features and plugins and such).

    What I'm suggesting is that your "easier" comes with substantial trade-offs and downsides that you are probably not considering because pseudo-WYSIWYG is shiny.

    --
    The only thing that stops a bad guy with a compiler is a good guy with a compiler.
    Starting Score:    1  point
    Moderation   +1  
       Insightful=1, Total=1
    Extra 'Insightful' Modifier   0  
    Karma-Bonus Modifier   +1  

    Total Score:   3  
  • (Score: 0) by Anonymous Coward on Wednesday July 03 2019, @12:36PM

    by Anonymous Coward on Wednesday July 03 2019, @12:36PM (#862674)

    Nope, I mean advanced functionality that would involve more coding effort. As for wysiwyg editors you can always allow pure html. Except for the simplest of sites or some seriously custom and weird functionality I just don't see any reason not to use a cms.

  • (Score: 3, Informative) by canopic jug on Wednesday July 03 2019, @01:19PM

    by canopic jug (3949) Subscriber Badge on Wednesday July 03 2019, @01:19PM (#862692) Journal

    There are plenty of times I've been able to get a lot of mileage out of the following extremely complicated PHP snippets:

    That's still too much PHP. If you just need some headers, footers, and maybe some menus, then you can do better with Server-Side Includes. Either use the XBit hack or add an output filter. After making a good template it becomes less work than using and maintaining a CMS, and is less risk than PHP.

    <!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    . . .
    <body>
    . . .
    <!--#include virtual="/header.html" -->
    . . .
    <!--#include virtual="/navmenu.html" -->
    . . .
    <!--#include virtual="/footer.html" -->
    . . .
    </body>
    </html>

    Both Apache2 and Nginx support Server-Side Includes. Though with Apache2, you should remember to configure it noexec, just out of principal.

    --
    Money is not free speech. Elections should not be auctions.