link, optional element
The link element is optional: syntax examples
1 2 3 4 5 6 7 8 9 10 | <!doctype html> <> <> <>... <⁄> <> <⁄> <> <⁄> <⁄> |
1 2 3 4 5 6 7 8 9 10 | <!doctype html> <> <> <>... <⁄> <⁄> <> <⁄> <⁄> |
Video demonstration link, optional element
HTML5 link, optional element Tutorial
min | video details |
---|---|
00:04 | open html file in Notepad++ |
00:08 | launch file in browser |
00:13 | video demonstration: link element is an optional element |
00:18 | note: link element is present both in head and body sections |
00:25 | Removing link tag from body section |
00:25 | if we remove link element from body, the user agents (spiders) will no longer associate that url to that item |
00:35 | while refreshing the page nothing happens because that microdata is for user agents, thus, removing it does not impact page display in Browser |
00:38 | Removing link tag from head section |
00:38 | if we remove the link element from head section, the css rules defined in main.css file no longer apply to our page, BUT we can achieve the same result through style element (internal style sheet) |
00:47 | CSS rules inside main.css file |
00:51 | the html page is no longer styled |
00:56 | Alternative way of styling an html page (without using the link element) |
00:56 | adding the style element in head section |
01:06 | copy ⁄ pasting the css rules from main.css inside style element |
01:11 | test: the page is styled again |
01:14 | Conclusion: it is highly recommended the separation of content form presentation, in which case the external style sheet is THE MOST RECOMMENDED (link element required), not to mention the benefits of using microdata (link element required), therefore, it is very likely that you'll use link element in your HTMML5 document |