logo
shape

HTML

HTML allows you to control the markup of your website.

HTML5 - MDN Web Docs Glossary
This code removes spaces around the email design added by some email clients.
Beware: It can remove the padding around the email design and add a background color to the “compose a reply” window.
                  
html, body {margin: 0 auto !important; padding: 0 !important; height: 100% !important; width: 100% !important;}
                
This code will stop email clients from resizing your text.
                              
* {-ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;}
                            
This code stops Outlook from adding extra spacing to tables.
                              
table, td {mso-table-lspace: 0pt !important; mso-table-rspace: 0pt !important;}
                            
This code is a workaround for email clients meddling in triggered links.
                              
*[x-apple-data-detectors],  /* iOS */ .x-gmail-data-detectors, /* Gmail */ .x-gmail-data-detectors *, .aBn {
border-bottom: 0 !important;
cursor: default !important;
color: inherit !important;
text-decoration: none !important;
font-size: inherit !important;
font-family: inherit !important;
font-weight: inherit !important;
line-height: inherit !important;
                              }
                            
This code will prevent Gmail from displaying a download button on large, non-linked images.
                      
.a65 .a6o {display: none !important; opacity: 0.01 !important;}
                
Most Asked Questions about HTML
What are HTML Data Attributes and how can they be used?

HTML5 introduced custom data attributes for storing extra information on HTML elements that aren't suitable for any existing attributes. They can be particularly useful because you can embed custom data attributes directly onto HTML elements, without having to set up a database or other storage solution. They are written as `data-*`, where * is replaced by the name of your choosing. This data can then be accessed and manipulated via JavaScript. For instance:

<div data-user="Nasir Watts" data-info="active user">...</div>

You could then access these attributes in JavaScript with `element.dataset.user` or `element.dataset.info`.

How does HTML5 improve accessibility on the web?

HTML5 introduces several new elements and attributes designed to enhance the accessibility of web content. It includes new semantic elements such as `<header>`, `<footer>`, `<article>`, `<section>`, and others that help to indicate what type of content is contained within them, making it easier for screen readers and other assistive technologies to interpret the page structure. HTML5 also provides the aria-* attributes, which allow for more detailed descriptions of elements and their roles, states, and properties, enhancing the information available to assistive technologies.

What is the purpose of the DOCTYPE declaration and why is it important?

The `<!DOCTYPE html>` declaration is important because it instructs the web browser about the HTML version of the web page. This helps ensure that the browser renders the page in standards mode, which supports the latest HTML specifications. Without this declaration, the page may be rendered in quirks mode, which emulates behavior from older browsers for compatibility.

This can cause inconsistencies and potentially make newer HTML and CSS features unavailable. It's important to note that the DOCTYPE declaration is not a regular HTML tag; it's a kind of system instruction.

© All rights Reserved. 2023