[clug] Server-side scripting - Content model, flow content

George at Clug Clug at goproject.info
Wed Jan 16 19:26:23 UTC 2019


Below are several links regarding the address element. I still
cannot determine whether it is permissible to use Tables within an
address element, and I would have to study "flow content", "Content
model", etc a lot more to understand the meaning and how these terms
are used.




http://jkorpela.fi/html/address.html
Using the address element

It seems very natural to use the address element for an address. But
according to the definition of the address element (in the HTML
specification), the element contains contact information for the
author of the document where it appears, or the author of a part of
the document.

In theory at least, someone who is specifically looking for contact
information about documents might have a user style sheet that
strongly highlights address elements, or a robot that specifically
searches for them. Of course, since address element is not very widely
used for its defined purpose, and since it is sometimes used
incorrectly for addresses in general, such methods are not highly
successful, but perhaps not completely pointless either.

Using a table

There's yet another option for presenting an address in markup: a
table. After all, the address consists of logical units (typically
rendered each on one line), which might have headers attached to them,
such as “Name”, “Street address”, etc. It looks pretty much
like a data table, with the headers as th cells, actual data in td
cells, and perhaps with a caption that says what the address is for,
or something. Now if you omit the caption and imply the headers, does
it stop being a table?

This means markup like the following:





		Jukka K. Korpela



		Päivänsäteenkuja 4 asunto 1



		02210 Espoo






https://developer.mozilla.org/en-US/docs/Web/HTML/Element/address
Permitted content     Flow content, but with no nested  element, no
heading content (, , , , , , ), no sectioning content (, , , ), and no
 or  element.


https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table
Permitted parents     Any element that accepts flow content

https://jats.nlm.nih.gov/archiving/tag-library/1.1d1/n-mp20.html
Address/Contact Information
Container element for contact information such as a postal address for
a person or organization.

This element may be contained in:
, , , , , , , , , , , , 
	* , , , , , , , 


https://jats.nlm.nih.gov/archiving/tag-library/1.1/element/table.html



======================================================================

https://stackoverflow.com/questions/27042119/correct-usage-of-html5-address-element


In your use-case, it probably is incorrect usage.

As per the official refs:

    The address element must not be used to represent arbitrary
addresses (e.g. postal addresses), unless those addresses are in fact
the relevant contact information. (The p element is the appropriate
element for marking up postal addresses in general.)

Ref, Living standard:
https://html.spec.whatwg.org/multipage/semantics.html#the-address-element

Ref, Spec HTML4.01:
http://www.w3.org/TR/html401/struct/global.html#h-7.5.6

Ref, Recomendation HTML5:
http://www.w3.org/TR/html5/sections.html#the-address-element

.

You are presenting several postal addresses, and so it seems a p is
more appropriate here. Regarding address, it represents contact
information for its nearest article or body and is also allowed in
footer.


Please use references that are not w3schools; it often contains
inaccuracies. The MDN and the HTML5 recommendation on w3.org are
excellent references. – misterManSam Nov 20 '14 at 14:44


https://www.w3.org/TR/html5/grouping-content.html#elementdef-address

https://html.spec.whatwg.org/multipage/sections.html

https://html.spec.whatwg.org/multipage/sections.html#the-address-element


https://html.spec.whatwg.org/multipage/dom.html#concept-element-content-model
Content model
    A normative description of what content must be included as
children and descendants of the element.

https://www.w3.org/TR/html5/grouping-content.html#elementdef-address
4.4.2. The address element
Content model:
    Flow content, but with no heading content descendants, no
sectioning content descendants, and no header, footer, or address
element descendants. 


https://jats.nlm.nih.gov/archiving/tag-library/1.1d1/n-mp20.html



========================================================================================

https://mailchimp.com/help/common-html-mistakes/


More information about the linux mailing list