Programming & Web Design Articles
Ever wonder what makes the software, websites, and blogs you use every day function properly (or improperly)? It's programming. Our articles reveal the ins and outs of programming and web design.
Articles From Programming & Web Design
Filter Results
Article / Updated 05-31-2022
For each web coding issue identified by a validator, you need to determine what course of action to take. Although some culprits that repeatedly crop up are easy to fix, such as missing alt text and </span> tags, you’re bound to find coding issues that completely baffle and stump you. For instance, if you get an error message that reads <span class="code">XML Parsing Error: Opening and ending tag mismatch: br line 52 and body</span>, it might be difficult to figure out what that means, let alone why it was caused and how you should fix it. As a strategy then, try to fix the issues within the code from the top down, as they’re listed in the validation results, because sometimes fixing one issue resolves another. With the XML parsing error, that issue might disappear when you correct for an omitted closing element on a <span class="code"><br /></span> tag listed earlier in the error results. The best way to find out how to code better and make fewer mistakes before validation testing is to make lots of honest mistakes and figure out how to correct them on your own. Most often, you can fix noncompliant code by hand or with the help of a good HTML editor. To help you identify some of the more common coding mistakes, here several code issues along with suggestions about how to fix them. <table> <tbody> <tr> <th>Problem</th> <th>Solution</th> </tr> <tr> <td> <pre class="code">alt</pre> text attribute missing from <pre class="code"><img></pre> tag</td> <td>Add the alternative text attribute, either with or without a description, as in <pre class="code"><img src="images/logo.gif" width="150" height="150" alt="Pete’s Pizza"> <img src="images/flourish.gif" width="200" height="150" alt=""></pre> .</td> </tr> <tr> <td> <pre class="code"><noscript></pre> tags missing from code</td> <td>Add <pre class="code"><noscript></pre> tags below each instance when JavaScript is present in in-line JavaScript or at the end of the content before the closing body tag. Between the <pre class="code"><noscript></pre> tags, insert HTML content (text, graphics, media files, and so on) that describes the function of the JavaScript and, when appropriate, how visitors can access the information revealed by it, as shown here: <pre class="code"><script language="JavaScript" src="bookmark.js" type="text/javascript"></script><noscript>The JavaScript used on this page provides a quick link that allows visitors to automatically bookmark this page. As an alternative, please use your browser’s Bookmark This Page feature. Flashing or flickering element(s) detected, such as animated GIFs, Java applets, and other multimedia plug-ins Adjust the speed of any animations to avoid causing the screen to flicker with a frequency between 2 Hz and 55 Hz. Animations that exceed these two measures may cause seizures in visitors with photosensitive epilepsy. No DOCTYPE specified Add a valid DOCTYPE above the opening tag. No HTTP charset parameter specified This special meta tag specifies the character set used in the HTML code. Some HTML editors include it automatically when generating new blank web pages. If validation finds that this tag is missing from your HTML or XHTML code, insert the following code by hand: . For HTML5, insert . No </pre> tag specified</td> <td>Add a unique title between <pre class="code"><title></pre> tags in the head area on each page.</td> </tr> <tr> <td>No <pre class="code"><meta></pre> tags specified</td> <td>Add meta keywords and meta description tags to the head of each page. These can be identical on every page on the site. If desired, you may also add additional meta tags as needed.</td> </tr> <tr> <td>No Robots tags specified</td> <td>Add the <pre class="code">Robots</pre> <pre class="code"><meta></pre> tag in the head of the page to instruct web spiders and robots whether to index the page and follow any hyperlinks, such as <pre class="code"><meta name="Robots" content="All"></pre> .</td> </tr> <tr> <td>Deprecated <pre class="code"><font></pre> tags detected</td> <td>Move all the presentation markup of the HTML (page, fonts, tables, links, and so on) to an external CSS file and remove all <pre class="code"><font></pre> tags and HTML and inline formatting attributes.</td> </tr> <tr> <td>Deprecated table height attribute detected</td> <td>Control table cell heights, when necessary, with CSS styles.</td> </tr> <tr> <td>Style attributes detected in the opening <pre class="code"><body></pre> tag</td> <td>Move <span class="code">body</span> attributes, like margin attributes and background page color, to a BODY tag redefine style in an external CSS file.</td> </tr> <tr> <td> <pre class="code">type</pre> attribute not specified for JavaScript or CSS</td> <td>Add the <pre class="code">type="text/css"</pre> attribute for <pre class="code"><style></pre> tags and the <pre class="code">type="text/javascript"</pre> attribute for <pre class="code"><script></pre> tags: <pre class="code"><style type="text/css" ><script type="text/javascript"></pre> .</td> </tr> <tr> <td>Entity name used instead of entity number</td> <td>Change the entity name to an entity number, such as using <pre class="code">$#169;</pre> instead of <pre class="code">©</pre> to create the copyright symbol (c).</td> </tr> <tr> <td>No background color attribute was specified for a CSS style that specifies text color</td> <td>Provide each style that contains a text <pre class="code">color</pre> attribute with an attending background <pre class="code">color</pre> attribute. The background color should match, or closely match, the background color upon which the text will display on.</td> </tr> </tbody> </table> When you’re finished identifying and adjusting all the noncompliant code identified by the validation tools, and have fixed everything that needed fixing, move on to the retesting and acceptable failure phase of the testing process.
View ArticleCheat Sheet / Updated 05-03-2022
If you're just getting started writing computer programs, you need to learn programming branching and looping statements to perform the specific jobs you need for an effective program. Keeping a list of computer programming resources for useful information handy can help, too.
View Cheat SheetCheat Sheet / Updated 05-02-2022
To complete any project using R, you work with functions that live in packages designed for specific areas. This cheat sheet provides some information about these functions.
View Cheat SheetCheat Sheet / Updated 04-27-2022
Coding is fast becoming a skill that every child needs to be educated for in the 21st Century. But coding is taught at only a small fraction of schools, and often only at the high school level. Helping kids learn how to code also means you’re assisting them in developing a skill that is highly marketable and sets them apart from peers at school and later, in their careers. The topics in this cheat sheet can assist you on getting started when your kid expresses an interest in learning how to code.
View Cheat SheetCheat Sheet / Updated 04-26-2022
Python is an incredibly flexible language that has significant third-party support and is used in a broad range of applications. The applications you build will run on any platform that Python supports without any modification as long as you create a pure Python solution. Of course, you want to ensure that your applications have the best chance possible of working exactly as you anticipated everywhere they're run, which is why you need the information in this cheat sheet.
View Cheat SheetCheat Sheet / Updated 04-25-2022
SQL is a popular and useful programming language. You can make SQL even more useful if you know the phases of SQL development, the criteria for normal forms, the data types used by SQL, a little bit about set and value functions, as well as some tips on how to filter tables with WHERE clauses.
View Cheat SheetCheat Sheet / Updated 04-20-2022
The terms virtual reality and augmented reality (and others, like mixed reality and extended reality) are thrown about everywhere today, but do you really know what they mean? Virtual and augmented reality are rapidly changing fields, so it helps to know where they are today and where they may be headed in the future. Finally, seeing how virtual and augmented reality are being used in a variety of industries and how exactly you can experience these technologies is key to your enjoyment.
View Cheat SheetCheat Sheet / Updated 04-20-2022
Working with PHP, MySQL, and JavaScript to create dynamic web applications can be difficult, but if you know a few programming tricks, you can make that job a lot easier. This Cheat Sheet shows you how to extract data from different databases in your PHP programs, filter out unwanted or potentially dangerous data from web forms, quickly find data stored in your MySQL database, and trigger timed events in your JavaScript programs.
View Cheat SheetCheat Sheet / Updated 03-25-2022
SwiftUI makes creating iPhone stacked and tabbed apps easy! You can add shake fail feedback using animation, so your users know when their login attempt has failed. And you can give users the option of sharing something in your app, using the Share Sheet.
View Cheat SheetCheat Sheet / Updated 03-23-2022
When you write an Objective-C program for your iOS or Mac OS X apps, all you're doing is providing a set of instructions for the computer to follow. Fundamentally, programs manipulate numbers and text, and all things considered, a computer program has only two parts: variables (and other structures), which "hold" the data, and instructions, which perform operations on that data. This Cheat Sheet provides some of the main aspects of Objective-C programming, including making a statement, built-in and new data types, operators, and more.
View Cheat Sheet