This is my first tribute page assignment. It will be a pleasure if you have a look at it and give me some feedback.
Project Link - https://codepen.io/VeraKuzub/full/GOMByN/
Hi @GoodMood,
- Target blank vulnerability
<a href="https://en.wikipedia.org/wiki/Alfred_Hitchcock" target="_blank">
MDN documentation:
<a>: The Anchor element - HTML: HyperText Markup Language | MDN
Note: When using target, consider adding rel=ânoopener noreferrerâ
to avoid exploitation of the window.opener API.
TL;DR If window.opener is set, a page can trigger a navigation in the opener regardless of security origin.
Target="_blank" - the most underestimated vulnerability ever
People using target=â_blankâ links usually have no idea about this curious fact:
The page weâre linking to gains partial access to the linking page via the window.opener object.
The newly opened tab can, say, change the window.opener.location to some phishing page. Or execute some JavaScript on the opener-page on your behalf⌠Users trust the page that is already opened, they wonât get suspicious.
How to fix
Add this to your outgoing links.
rel="noopener"
Update: FF does not support ânoopenerâ so add this.
rel="noopener noreferrer"
Remember, that every time you open a new window via window.open(); youâre also âvulnerableâ to this, so always reset the âopenerâ property
var newWnd = window.open();
newWnd.opener = null;
- Do not use lower levels to decrease heading font size:
<header>
<h1 class="text-center">Alfred Hitchcock</h1>
</header>
<h3 class="text-center"><em>Television Personality, Screenwriter, Producer, Director (1899â1980)</em></h3>
MDN documentation:
<h1>â<h6>: The HTML Section Heading elements - HTML: HyperText Markup Language | MDN
Do not use lower levels to decrease heading font size: use the CSS font-size property instead.Avoid skipping heading levels: always start from
<h1>, next use<h2>and so on.
h2âh6 elements must not be used to markup subheadings, subtitles, alternative titles and taglines unless intended to be the heading for a new section or subsection. Instead use the markup patterns in the §4.13 Common idioms without dedicated elements section of the specification.
Common Idioms
HTML Standard
- You can use an address element (more descriptive):
<footer>
Coded by Vera Kuzub
</footer>
MDN documentation:
<address>: The Contact Address element - HTML: HyperText Markup Language | MDN
The HTML
<address>element supplies contact information for its nearest<article>or<body>ancestor; in the latter case, it applies to the whole document.
Usage notes
- To represent an arbitrary address, one that is not related to the contact information, use a
<p>element rather than the<address>element.- This element should not contain more information than the contact information, like a publication date (which belongs in a element).
- Typically an
<address>element can be placed inside the<footer>element of the current section, if any.
Example
<address>
You can contact author at <a href="http://www.somedomain.com/contact">www.somedomain.com</a>.<br>
If you see any bugs, please <a href="mailto:webmaster@somedomain.com">contact webmaster</a>.<br>
You may also want to visit us:<br>
Mozilla Foundation<br>
1981 Landings Drive<br>
Building K<br>
Mountain View, CA 94043-0801<br>
USA
</address>
Cheers and happy coding ![]()
Thank you for your help. 