المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : كود الذهاب لاعلى صفحة الموقع #Top



Rise Company
16-04-2017, 15:40
كود الذهاب لاعلى الصفحة #Top

https://www.rise.company/forum/images/imported/2017/04/1.png

هذا هو الكود


<a href="#top">Go to top</a>



To create a link that goes to the top of a web page, follow the steps below.
In your HTML code, find the opening <body> tag (this should be located right after the closing </head> tag). Immediately after the opening <body> tag, add the following code:


<a name="top"></a>

The above code would create an anchor (http://www.computerhope.com/jargon/a/anchor.htm) on the page named top.
Next, place the link back to the top of the page by using the # symbol followed by the anchor name/id (in this case top) as the value of the href attribute, as shown below:


<a href="#top">Back to top of page</a>




للتجربة

https://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_a_href_anchor