Is it valid to have paragraph elements inside of a heading tag in HTML5 (P inside H1)?

Actually, no. This markup is not correct according to W3C. You should avoid using this. It is stated that the correct content for header elements is a “phrasing content“, which is phrasing elements intermixed with normal character data. In other words you can use the following convenient elements inside of a header tag in HTML5: … Read more

What is the most semantic way to display a street address in HTML?

You could use the hCard Microformat to describe your address. The advantage of Microformats is that you can use them in your existing documents to enrich them. Here’s an example derived from the example from the Microformats wiki: <address class=”vcard”> <span class=”adr”> <span class=”street-address”>169 University Avenue</span> <span class=”locality”>Palo Alto</span>, <abbr class=”region” title=”California”>CA</abbr>&nbsp;&nbsp; <span class=”postal-code”>94301</span> <span … Read more

Google +1 Button not W3C compliant

Does anyone know why this happens? Because Google designed it to use tag soup instead of HTML How to make this compliant? The documentation has alternative markup that is valid under the draft HTML 5 specification: <div class=”g-plusone” data-size=”standard” data-count=”true”></div> If you want it to work with HTML 4.x or XHTML 1.x then you might … Read more

Navigator.sendBeacon() to pass header information

See the Navigator.sendBeacon MDN documentation for further information. Create a blob to provide headers. Here is an example: window.onunload = () => { const body = { id, email, }; const headers = { type: ‘application/json’, }; const blob = new Blob([JSON.stringify(body)], headers); navigator.sendBeacon(‘url’, blob); }; navigator.sendBeacon will send a POST request with the Content-Type … Read more

Is it wrong to change a block element to inline with CSS if it contains another block element?

From the CSS 2.1 Spec: When an inline box contains an in-flow block-level box, the inline box (and its inline ancestors within the same line box) are broken around the block-level box (and any block-level siblings that are consecutive or separated only by collapsible whitespace and/or out-of-flow elements), splitting the inline box into two boxes … Read more

Is it safe to omit and tags?

This is valid HTML but invalid XHTML. There’s nothing intrinsically wrong with it. If you look at the source for Google’s privacy policy (or any of their other pages), you’ll find some much terser HTML. It does mean that your page will not be usable by an XML parser.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)