Email Design Email HTML and CSS Coding 2 — Questions and Answers
Question 1: What does the cellspacing attribute control in HTML email tables?
- The spacing between the table content and its border
- The spacing between individual table cells (Correct answer)
- The spacing between table rows only
- The total width of the table
Correct answer: The spacing between individual table cells
The cellspacing attribute sets the space between adjacent table cells, which should typically be set to 0 to avoid unwanted gaps.
Question 2: What is the purpose of the width attribute on <td> elements in email tables?
- To control the font size inside the cell
- To define the fixed or percentage width of a table column (Correct answer)
- To set the background color of the cell
- To hide the cell from certain email clients
Correct answer: To define the fixed or percentage width of a table column
Setting width on <td> elements defines the column width explicitly, preventing rendering inconsistencies across different email clients.
Question 3: Which email client is known for the poorest support of modern CSS features?
- Apple Mail
- Gmail on iOS
- Outlook (Windows, 2013-2019) (Correct answer)
- Yahoo Mail
Correct answer: Outlook (Windows, 2013-2019)
Outlook for Windows (2013–2019) uses Microsoft Word's rendering engine, which has extremely poor CSS support, requiring many workarounds.
Question 4: What does a 'ghost table' technique solve in HTML email coding?
- It hides decorative tables from screen readers
- It uses MSO conditional comments to force Outlook to display multi-column layouts correctly (Correct answer)
- It creates invisible tracking tables
- It generates placeholder layouts before images load
Correct answer: It uses MSO conditional comments to force Outlook to display multi-column layouts correctly
Ghost tables use MSO conditional comments to wrap tables that force Outlook's rendering engine to display multi-column layouts properly.
Question 5: What is the safest unit to use for font sizes in HTML email code?
- em units
- rem units
- vw units
- px units (Correct answer)
Correct answer: px units
Pixel (px) units are the most reliably supported for font sizes across email clients, as relative units like em/rem may behave unexpectedly.
Question 6: What does the valign attribute do in an HTML email table cell?
- Sets the horizontal alignment of cell content
- Sets the vertical alignment of content within the cell (Correct answer)
- Sets the visibility of the cell
- Validates the HTML structure of the cell
Correct answer: Sets the vertical alignment of content within the cell
The valign attribute controls vertical alignment of content within a table cell, accepting values like top, middle, and bottom.
What does the cellspacing attribute control in HTML email tables?