Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7552027
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T10:39:17+00:00 2026-05-30T10:39:17+00:00

Imagine a fairly simple HTML document <!DOCTYPE HTML > <html> <body> <table> <tr> <td>

  • 0

Imagine a fairly simple HTML document

<!DOCTYPE HTML >
<html>
<body>
<table>    <tr>    <td>    This is a test    </td>    </tr>    </table>
</body>
</html>

where we are applying this css

body {background-color: ffffff;
font-size:100px;
font-style: normal;
font-family: MankSans,Arial,Helvetica, sans-serif;
}

In every single modern browser out there the font properties will apply. in my WebView however, they wont.

Looking around I found out that the problem is that the WebView goes into quirksmode, where the td tag lacks inheritance so the body css doesnt apply.

Im aware that there are ways around this, like using a more explicit 4.01 doctype, or adding this to the css

table, thead, tbody, tr, td, th {
font-size: inherit;
font-family: inherit;
}

these however dont fix the root of the problem, which is that WebView decides against all logic to suddenly “missunderstand” the HTML5 doctype and switch to quirksmode, when all other WebKit-based browsers (Safari, Chrome, etc) behave correctly.

Is there any way to programmatically fix this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T10:39:18+00:00Added an answer on May 30, 2026 at 10:39 am

    Ok, my stupid mistake

    it turns out that the doctype is getting screwed because before sending the HTML document to the webview im treating it, and adding an internal ID to all tags (this internal ID is required for features inside my app)

    but in case someone screws up in the same way I did and wonder whats going on, I’ll offer a lenghty explanation.

    DOMDocumentType has several fields, among them you have name, publicId and systemId.

    for example, consider the typical HTML 4.01 transitional doctype

    it can be divided in

    name = html
    publicId = -//W3C//DTD XHTML 1.0 Transitional//EN
    systemID = http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd

    and you can add a Custom ID to it as long as the format is preserved, like this

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" CustomID="1">
    

    the problem with the HTML 5 DOCTYPE is that while it looks like a)

    <!DOCTYPE html>
    

    for the DOM, it actually is b)

    <!DOCTYPE html PUBLIC "" "">
    

    long story short, adding my CustomID=”1″ at the end of a) caused the DOM to not recognize it as a valid DOCTYPE, hence switching my WebView into quirksmode. If you want to have an HTML5 DOCTYPE and add a custom id to it you should do

    <!DOCTYPE html PUBLIC "" "" CustomId="1">
    

    w3schools.com tells us that the id attribute is not valid in: base, head, html, meta, , script, style, and title.

    they should warn us that, poorly placed, it can also screw your DOCTYPE =)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I imagine this is fairly simple and one I should be able to get
I imagine that this is a simple question, but I'm getting some strange results
Imagine this directory structure: app/ __init__.py sub1/ __init__.py mod1.py sub2/ __init__.py mod2.py I'm coding
Imagine that you have a simple site with only 2 pages: login.aspx and secret.aspx.
Fairly simple question, but I don't see it anywhere else on SO: Do indexes
I am trying to build an fairly simple iPad app that requires me to
Let's say I want to create an application, fairly simple CRUD with 3-5 tables.
I wrote a fairly simple GUI program to automate a few processes for Windows
I wrote this simple Prolog program. man(socrates). mortal(X) :- man(X). immortal(X) :- immortal(X). I
I have this idea that using SQL VIEWS to abstract simple database computations (such

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.