html - What is the difference between phrasing content and flow content? -


i new html , css , know difference between flow content , phrasing content. other w3 official documentation mdn documentation helpful , states:

flow content defined following:

elements belonging flow content category typically contain text or embedded content.

phrasing content defined following:

phrasing content defines text , mark-up contains. runs of phrasing content make paragraphs.

however, documentation gives little difference between two, can clarify major differences between phrasing content , flow content?

the easiest way remember, if can inside sentence, it's phrasing content.

text can inside sentence, it's phrasing.

an emphasised bit can inside sentence, it's phrasing.

an image can inside sentence, it's phrasing.

a sub-heading or article cannot inside sentence, not phrasing.

a link can inside sentence, it's phrasing. of html 5, 1 allowed have link containing whole blocks of text, in case not phrasing.

phrasing content falls 3 categories:

  1. content replaced visually. (e.g. <img> replaced image.
  2. content contains text within run.
  3. content provides metadata specific piece of text within run. (e.g. <link> when used itemprop rather <link> in <head> defines relationship between document whole , resource linked to).

flow content includes phrasing content, elements <p> , <h1> define whole run of text, <article> contains 1 or more runs , <table> contains rows of cells contain runs of text.

it critical in advanced css know different kinds of content , not definition of , or list of elements come under type of content , "why" element comes under category , whats major difference between similar content categories , in case of question , whats difference between "phasing content" , "flow content".

i don't entirely agree.

it's absolutely vital basic html know this. it's first thing should taught in html after writing <html><head><title>hello</title></head><body><p>hello world!</p></body></html> in text editor , opening in browser, , "there several different elements in html". may not become clear until 1 has learnt elements examples of each, getting one's head around important lot of things don't make sense otherwise , makes difference between simple markup language easy-to-remember elements , attributes , messy soup of tags can never remember why validators saying you're doing wrong.

now certainly, css going follow semantics, , defaults follow them (most visible phrasing content either replaced element or display: inline;, other flow content either display: block; or relates quite semantics (e.g. tr: {display: table-row;}).

but because html think first semantics, when writing css can focus more on rendering, , degree free concern. certainly, correct semantics should not become restriction upon css beyond simple fact want visual design helps message across.

so example, because <p> defined "a paragraph" , in our culture paragraphs today typeset blocks of text either vertical margin between them or indent on first line, not mean have follow rule. can layout our paragraphs in late-mediƦval style here paragraphs running separated pilcrows.

not want so, can. while css build on semantics of elements, frees them in don't have have incorrect semantics in order have (or sound) want.


Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -