Clever Web Design / Items
10 HTML Tag Crimes You Really Shouldn’t Commit
Get Feed- Description
-
10 HTML Tag Crimes You Really Shouldn’t Commit
You better watch out, because the HTML police are about. They scour your code and pick out the most unspeakable crimes against HTML markup. This handy list of ten HTML tag crimes sheds some light on some of the most common coding mistakes and helps provide an alternate solution. Tips include writing valid markup, making semantic choices, avoiding deprecated tags and more!
Crime 1: Placing Block Elements Inside Inline Elements
HTML elements can either be displayed in two ways, Block or Inline. Each tag by default is naturally either a block or inline element. Block elements include divs and paragraphs, that make up the structure of the document. Inline elements on the other hand should sit inside block elements and go with the flow of the document, examples include anchors and span tags. With this in mind, inline elements should always go inside block elements, and never the other way around.
Crime 2: Not Including an ALT Attribute on Images
The ALT attribute is a required element on all images displayed on a web page. It helps users determine what the image is, should they be browsing on a screen reader, or simply on a slow connection. The ALT attribute should describe the image being shown, so an alt=”image” is bad practice. If the image is purely for decorative ...
- Original URL
Comments
Report ThisTwine is about discovering, collecting and sharing the content that interests you. Learn More
Join TwineStats
- 6 Twines
- 2 Comments
Who's Interested In This?
-
Gendrin Olivier added to Web Design and Development, Clever Web Design, Design Inspiration, User Interface Design, Web Development 4 months ago
-
Marcello Cividini added to * Brand building 3 months ago
Public Comments
-
Dmitry Kazimirov
4 months ago
-
Patsy Seow Yoke May
4 months ago
Add a Comment- Some HTML is allowed.
- Reply
- Cancel
- Submit
Design Inspiration- Some HTML is allowed.
- Reply
- Cancel
- Submit
User Interface Design