anchor page

DONT ADD ANYTHING HERE!

  1. A valid browsing context name or keyword is any string that is either a valid browsing context name or is an ASCII case-insensitive match for one of:
    1. _blank
      1. Usually a new tab, but users can configure browsers to open a new window instead
    2. _self
      The current browsing context (Default)
    3. _parent
      1. The parent browsing context of the current one
      2. If no parent, behaves as _self
    4. _top
      1. The topmost browsing context
      2. To be specific, this means the "highest" context that's an ancestor of the current one
      3. If no ancestors, behaves as _self
  2. Browsing contexts can have a browsing context name
  3. By default, a browsing context has no name (its name is not set)

Example (target=_parent)

HTML

    <iframe width="325" height="450" 
        style="background-color:#18836f"
        src="./embedded_iframe_target_parent.html">
    </iframe>
    
    // External file (embedded_iframe_target_parent.html)

    <iframe width="425" height="350" 
        srcdoc="
        <a href=./origin_species_sample.html target=_parent>Origin Species</a>"
        style="background-color:lightblue; width:80%; height: 50%">
        Origin Species
    </iframe>

Browser

Notes

target=_parent in anchor tag

Example (target=_self)

HTML

    <iframe width="325" height="450" 
        style="background-color:#18836f"
        src="./embedded_iframe_target_self.html">
    </iframe>

    // External file (embedded_iframe_target_self.html)

    <iframe width="425" height="350" srcdoc="
        <a href=./origin_species_sample.html target=_self>
            Origin Species</a>"
        style="background-color:lightblue; width:80%; height: 50%">Origin Species
    </iframe>

Browser

Notes

target=_self in anchor tag

Example (target=named iframe)

HTML

    <iframe width="325" height="450" 
        style="background-color:#18836f; height:50%"
        src="./embedded_iframe_target_neighbour.html">
    </iframe> <br>

    <iframe width="325" height="450" 
        name="neighbourIframe"
        srcdoc="<div style=color:white;font-size:1.5em>I am the neighbour</div>"
        style="background-color:#18836f;">
    </iframe>

    // External file (embedded_iframe_target_neighbour.html)

    <iframe width="425" height="120"
        srcdoc="
        <a href=./origin_species_sample.html target=neighbourIframe>Origin Species</a><br>
        <a href=./alice_in_wonderland_sample.html target=neighbourIframe>
        Alice in Wonderland</a>"
        style="background-color:lightblue; width:80%;">Origin
        Species
    </iframe>

Browser


Notes

  1. target=neighbourIframe in anchor tag
  2. name="neighbourIframe" in targetted iframe

References