Current location - Quotes Website - Signature design - 04_HTML inline frames and hyperlink tags
04_HTML inline frames and hyperlink tags

Time: 2018-09-29 Name: Wei Wenying

Introduce another html file into the current html:

src="lesson-02.html" Quote After adding the file lensson-02.html, the effect is like this

Inline frames can also specify other attributes, such as width ( width ), height ( height ), and name ( name ):

Note: Inline frames are not recommended because search engines will not crawl the content of inline .html.

Use the tag to add a hyperlink:

The display effect is as follows:

The clicked hyperlink will turn red. The target="_blank" attribute makes the hyperlink page open in a new tab when clicked. The target="_self" attribute is to open a hyperlink in the current tab page. Of course, it can also be opened in an inline frame:

Next, target="test" is used to associate the name="test" attribute in the inline frame. The display effect after clicking the hyperlink is as follows:

In structure, presentation, and behavior, centered display belongs to presentation and is set in CSS, so it is not recommended to use HTML for centered description. If you must specify centering in HTML, you can use the

tag:

Note: The

tag is deprecated.

In web pages, we often click on the return to top hyperlink to return to the top of the page:

In the a tag, set the hyperlink attribute href="#", click this hyperlink link to return to the top. Of course, you can also go to any position on the page by setting the id attribute of the a tag:

The value of the id attribute cannot be repeated in the same HTML page. It's easy to understand. If you set id="label" in many places, then href="#label" will not know where to locate it. The value of id can only start with a letter. For example, id="123abc" will not work. It cannot start with a number.

Similar to the effect of clicking Contact Us: