The prefix hyper is used in HTTP (Hypertext Transfer Protocol) and in HTML (HyperText Markup Language). Links in a hypertext document are also called hyperlinks. I get that hyper means higher or more that something and that HTML is more that just a text file conceptually. I know also that this is Tim berners-Lee who used this word from Ted Nelson.
I would like to know why the hyper prefix is used, especially for links in HTML. Is there a technical reason that I don't get or is it just a semantical reason ? Does someone have a clear explanation of the usage of this term in this context ?
Thank you in advance.
From the W3C
Ted Nelson originally invented the word "hypertext" for
"non-sequential writing".
What is HyperText?
Hypertext is text which is not constrained to be linear. Hypertext is
text which contains links to other texts. The term was coined by Ted
Nelson around 1965 (see History ).
HyperMedia is a term used for hypertext which is not constrained to be
text: it can include graphics, video and sound , for example.
Apparently Ted Nelson was the first to use this term too.
Hypertext and HyperMedia are concepts, not products.
So it only follows on that "hyperlinks" would follow on that way.
Related
So I came across BritishMuseum.org. Inspecting the HTML as you do I noticed a strange prefix attribute.
<html lang="en" prefix="content: http://purl.org/rss/1.0/modules/content/ dc: http://purl.org/dc/terms/ foaf: http://xmlns.com/foaf/0.1/ og: http://ogp.me/ns# rdfs: http://www.w3.org/2000/01/rdf-schema# schema: http://schema.org/ sioc: http://rdfs.org/sioc/ns# sioct: http://rdfs.org/sioc/types# skos: http://www.w3.org/2004/02/skos/core# xsd: http://www.w3.org/2001/XMLSchema#"> . . .</html>
Doing some research: some say Open Graph, some say RDF vocabulary and some 'Foaf, (Friend of a friend)' image say XML. I'm so confused. A post on Quora said this:
RDFa is used to implement the Semantic Web in web pages represented in many markup languages, like HTML and XML. Instead of having a web page telling the browser just how it should be structured, now you can also tell it what the page represents, like a Person, a List of Products, etc.
What do we mean by Semantic Web? We all strive to make a webpage completely accessible and 'Semantically' correct, sure. Section tags... Article tags... Can we literally enforce that by this prefix tag? This Museum site isn't a person, a List or a product but it is a place.
Why does this museum need to add this prefix tag to the HTML element?
Also inspecting... I can see what looks like Schema. Now, this does make sense because of the visibility they wish to gain through search engines.
<img src="/src.jpg" typeof="foaf:img">
Then on their Donate page
<div about="/support-us/donate" typeoof="schema:WebPage"> ... </div>
Who knew you could put URLs there? :-)
It seems with a majority of their headings we also have
<span property="schema:name">Corporate support</span>
Does doing this have any real benefit? And why the very long HTML prefix? Seldom seen on the web nowadays in my opinion. Penny for your thoughts on this?
What do we mean by Semantic Web?
Wikipedia has a good introduction, but essentially it involves adding more machine readable data to the WWW.
We all strive to make a webpage completely accessible and 'Semantically' correct, sure. Section tags... Article tags... Can we literally enforce that by this prefix tag?
The goal of the semantic web is to go beyond the semantics of HTML.
some say Open Graph, some say RDF vocabulary and some 'Foaf, (Friend of a friend)' image say XML. I'm so confused.
Open Graph is a means to encode a certain set of additional semantics.
FOAF is a means to encode a different set of additional semantics (specifically about how people relate to each other).
RDF is a more generic means to encode semantics. FOAF and Open Graph are used with it.
XML is a generic markup language that is designed to be used as the foundation of other markup languages.
RDF is often expressed using XML.
RDFa defines the prefix attribute that you have quoted.
foaf: http://xmlns.com/foaf/0.1/ defines a prefix for FOAF data in the document.
og: http://ogp.me/ns# defines a prefix for Open Graph data in the document.
Attributes then reference it. e.g. <img src="/src.jpg" typeof="foaf:img"> states the element is what FOAF defines as img.
Does doing this have any real benefit?
I have no data on either:
Third party tools interacting with the data on webpages (beyond the use of social media using Open Graph for thumbnails et al)
Any internal tools the museum is using on their own data.
And why the very long HTML prefix?
Because they have data from a lot of namespaces.
I'm currently working on a site's accessibility by adding <abbr> tags in appropriate places.
This works great for some users but I'm concerned about accommodating visual users who cannot mouse over the abbreviated text to view the tool-tip.
I've read through this article at A List Apart and they recommend linking to a glossary page. This seems like overkill for the site I'm working on as there will only be a few items I'm defining.
Are there other options?
You could use javascript to add auto append them to the bottom of the page as foot notes like wikipedia references.
A quick google search give me two options:
A javascript library called abbr-touch.js
Adding a <span> tag inside the <abbr> tag as in http://accessify.com/tools-and-wizards/developer-tools/acrobot/why-use.php
In many situation, abbr tag is an aberration.
If an user has to focus the text in order to understand its meaning, then it's not the good way to do, no matter if he's doing so with a mouse or with a keyboard.
You want to help and make things clear.
In my opinion, the best way is to "provide the first use of an abbreviation immediately before or after the expanded form" (http://www.w3.org/TR/2015/NOTE-WCAG20-TECHS-20150226/G97)
I live in West Virginia (W. Va.)
Also remember that an abbreviation is, according to WCAG, "shortened form of a word, phrase, or name where the abbreviation has not become part of the language" (when you can read it as written).
I can send you my CV
So using an evident abbreviation like CIA, FBI, NSA, Mr., Dr., CV when the context is clear does not need any other thing, as you do not want a screenreader to read "Central Intelligence Agency", and it won't give any clue for people not knowing what the CIA is. If you really care to do so, a glossary is sufficient enough.
Sometimes, you might want to help assistive technologies to pronounce the abbreviation (for instance, differentiating "Dr." when it's "doctor" or "Drive") but then again abbr tag won't help. You should then use something like aria-label.
We have a global website showing unique content for each separate country. We have some problems about hreflang usage. Our site structure is like this:
Main portal:
example.com
If visitor from Germany, he will redirected to:
de.example.com
If this German visitor prefers to change language into English, he will open this page:
de.example.com/en
Each subdomain has different content, so de.example.com has content for Germany and fr.example.com has content for France and not the same. If the visitor from a country prefers to change the language, let's say German visitor from France, he will open:
fr.example.com/de
So for this situation how can we use the hreflang and x-default tags?
The hreflang attribute (not tag) won’t help you at all. It is just declarative, indicating the language of the linked resource.
There is no x-default tag or attribute in HTML.
As regards to your problem, you have not described what the problem is. If it is about designing and implementing a multilingual site, as opposite to solving some specific problems with it, I’m afraid it is off-topic at SO due to being too broad.
I have small sections of text on my site that are in French (Canadian). When I look up on the W3schools language code reference, I find there is only a list of specific languages but not location. Is writing <span lang="fr-CA"> valid? Does adding the location-base of the language have any impact at all on screen-readers?
Yes, <span lang="fr-CA"> is valid, but you should not expect it to provide any benefits over <span lang="fr"> in most cases. In fact I have used a screen reader that recognized a few values for the lang tag but only when simply codes like en and fr were used.
According to HTML5 PR, the lang attribute value is a language code, or “language tag” as they call it, as defined in BCP 47, which is a concatenation of RFCs Tags for Identifying Languages and Matching of Language Tags. It defines a rather complicated system of codes. Most of the possibilities have no use in HTML in practice, now or in the foreseeable future. The code system has been defined to meet many different needs, including bibliographic information and text databases.
Using fr-CA is possible in accordance with RFC 5646, clause 2.2.4. Region Subtag:
Region subtags are used to indicate linguistic variations
associated with or appropriate to a specific country, territory, or
region. Typically, a region subtag is used to indicate variations
such as regional dialects or usage, or region-specific spelling
conventions. It can also be used to indicate that content is
expressed in a way that is appropriate for use throughout a region,
for instance, Spanish content tailored to be useful throughout
Latin America.
The subtag CA is the ISO 3166-1 country code for Canada, so fr-CA denotes French as spoken and written in Canada, i.e. Canadian French. It is possible that a screen reader that can speak French in different variants and recognizes lang attributes will use Canadian pronunciation for an element that has lang="fr-CA". However, this is probably very theoretical and would be of little practical impact if it were actually implemented.
More realistically, such an attribute may have other effects. If you open an HTML document in MS Word, it will recognize lang attributes. Whether this has any practical impact depends on whether and how Word treats Canadian French as differently from French in general e.g. in spelling checks.
The next reference on W3schools describes valid country codes and how to use them with language codes.
Ex: <html lang="en-US">
In regards to screen readers, it would depend on how the reader was implemented. Generally they would get the language from <html> but it is possible that some implementations may allow for the language to change over the course of the document.
The lang attribute can be used in any html element, as described in the HTML specifications, so <span lang="fr-CA"> would be valid.
The cite attribute specifies the address of the source of the quoted text, I think, but who uses this information?
For example:
<q cite="http://www.example.com/quote">
<p>“A quote”</p>
<footer>Person quoted</footer>
</q>
The source of the quoted text isn't visible to the end-user in a normal browser, so who does use this information, and how?
First, it's not only blockquote where you can use the cite attribute.
You can use the cite attribute on the following elements also:
<blockquote>
<del>
<ins>
<q>
Why would one use cite in above elements?
To point to where the content is taken from, or change or deletion is referred.
Here is what w3.org says,
User agents may allow users to follow such citation links, but they
are primarily intended for private use (e.g: by server-side scripts
collecting statistics about a site's edits), not for readers
Now, the question, who uses it?
The cite attribute is used to identify the online source of the quotation in the form of a URI (for example, "http://sourcewebsite.doc/document.html").
The value of the cite attribute isn't rendered on screen (although this potentially useful meta data could be extracted and written back into the webpage through the magic of DOM Scripting).
As such, browser support for this attribute is marked as none, but because it has other potential uses (for search engine indexing, retrieval via DOM scripting, and more) and there is the likelihood of improved native support being provided for the attribute in future browser versions, you should use the cite attribute when you use the above elements.
So, currently no one uses it, but in future maybe used in user-agent or my search engines, so better to use it.
Both the <cite> tag and the cite attribute are for semantic purposes, which means that they are simply for giving a website more "meaning". For example, I could use a <div> tag for a quote, rather than using a <blockquote> tag, but this provides less meaning to the browser, and hence using <blockquote> is recommended for quotes.
The same is with the <cite> tag and cite attributes. As per the MDN definition for the cite attribute (link here):
Use the cite attribute on a or element to reference
an online resource for a source.
"so who does use this information, and how?" - I believe that search engines (e.g. Google) would use this information to show potential links between documents. If you think about this it is a major point. Check out the image below:
Notice how it shows the "Samsung Group" information box on the right. The guys who work at Google don't write this information - rather, it is sourced from Wikipedia. However, this information would be of greater relevance to the search "samsung" when this information is also written on other websites, with the cite attribute linking this information to Wikipedia (hence increasing the relevancy of Wikipedia). This is why Wikipedia's information is used here, and not some primary school's website regarding Samsung phones.
The cite attribute simply provides more meaning to the website. Tim Berners-Lee has described the semantic web as a component of "Web 3.0" - in other words, many components of the updating HTML language are simply to provide more meaning onto the webpage, as a step closer to Web 3.0.
TL;DR - in simpler terms, the cite attribute is just to provide more meaning to the web page, and may be used for search engines for better web linkage.
W3C has this to say:
The value of this attribute is a URI that designates a source document or message. This attribute is intended to give information about the source from which the quotation was borrowed.
It's not visible and I can't think of anywhere it's used except perhaps by search engines.
It is meant to be used by machine which collect and arrange data eg. search engines, but it can be used by any machine. It is meant to make webpages more systematic to be read by machine. As they can not understand which part of text represent citation and quote based on only context.
you can look up Semantic Web for more information.
http://en.wikipedia.org/wiki/Semantic_Web
Yes, the source of the quotation isn't visible to end user. So it's just a reference to the source.
Definition from WHATWG.ORG:
Content inside a q element must be
quoted from another source, whose
address, if it has one, may be cited
in the cite attribute. The source may
be fictional, as when quoting
characters in a novel or screenplay.
If the cite attribute is present, it
must be a valid URL potentially
surrounded by spaces.
Quoted from W3Schools:
The cite attribute is not supported by any of the major browsers.
However, search engines may use it to get more information about the quotation.
http://www.w3schools.com/tags/att_q_cite.asp
It's just another meta data chunk that can be used by server side scripts to collect statistics or by front end developpers to add functionnalities (they can choose to print the source, allow to access the original source, etc...).
It's just a good practice to have the original source written somewhere although it is actually not very useful for the end user.