ยินดีต้อนรับคุณ, บุคคลทั่วไป กรุณา เข้าสู่ระบบ หรือ ลงทะเบียน

เข้าสู่ระบบด้วยชื่อผู้ใช้ รหัสผ่าน และระยะเวลาในเซสชั่น

ThaiSEOBoard.comพัฒนาเว็บไซต์Programmingถามเรื่อง Link หน่อยคับ
หน้า: [1]   ลงล่าง
พิมพ์
ผู้เขียน หัวข้อ: ถามเรื่อง Link หน่อยคับ  (อ่าน 8085 ครั้ง)
0 สมาชิก และ 1 บุคคลทั่วไป กำลังดูหัวข้อนี้
kanokk
หัวหน้าแก๊งเสียว
*

พลังน้ำใจ: 87
ออฟไลน์ ออฟไลน์

กระทู้: 2,395



ดูรายละเอียด เว็บไซต์
« เมื่อ: 09 ตุลาคม 2008, 23:48:23 »

คือว่า พอดีวันนี้ไปสังเกต เจอว่า ตัวเองได้ทำไรแปลกๆไว้ คือ
ทำลิงค์โคดไว้ 2 แบบ แต่เห็นมันก็ใช้งานได้ปกติ เลยสงสัยว่าที่จิงแบบไหนมันถูกต้องอ่ะคับ

โค๊ด:
<a href="http://www.XXX.info">XXX</a> กับ <a href=http://www.YYY.info>YYY</a>

ทั้งสองแบบ ต่างกันตรงที่มีเครื่องหมาย "...." ครอบลิงค์ URL ไว้
รบกวนด้วยนะคับ
บันทึกการเข้า

AuGusTin
Verified Seller
หัวหน้าแก๊งเสียว
*

พลังน้ำใจ: 41
ออฟไลน์ ออฟไลน์

กระทู้: 1,122



ดูรายละเอียด
« ตอบ #1 เมื่อ: 10 ตุลาคม 2008, 00:04:12 »

แนะนำให้ใช้แบบที่หนึ่งครับ อย่าลืมใส่ title="ข้อความ seo" ไว้ด้วยน่ะครับ ช่วยเรื่อง seo  :Smiley
บันทึกการเข้า

sutenm
Verified Seller
หัวหน้าแก๊งเสียว
*

พลังน้ำใจ: 98
ออฟไลน์ ออฟไลน์

กระทู้: 1,563



ดูรายละเอียด เว็บไซต์
« ตอบ #2 เมื่อ: 10 ตุลาคม 2008, 00:39:47 »

ผมไม่เคยคิดเลยแฮะ .. คิดแต่อย่างเดียวว่า bot เจอ link มันจะโดดเอง..
บันทึกการเข้า

Powered By Sutenm
~สายลม~
Verified Seller
เจ้าพ่อบอร์ดเสียว
*

พลังน้ำใจ: 234
ออฟไลน์ ออฟไลน์

กระทู้: 4,559



ดูรายละเอียด เว็บไซต์
« ตอบ #3 เมื่อ: 10 ตุลาคม 2008, 04:30:42 »

แนะนำให้ใช้แบบที่หนึ่งครับ อย่าลืมใส่ title="ข้อความ seo" ไว้ด้วยน่ะครับ ช่วยเรื่อง seo  :Smiley

ผมทำแต่แบบที่ 2 มาตลอดเลย

ยืนยันหรือหาเหตผลให้ผมหน่อยได้มั้ยครับว่า แบบที่ 1 มันส่งผลดีในแง่ seo มากกว่า แบบที่ 2 ยังไงครับ

ปล จุดนี้ ผมไม่รู้จริงครับ  Cry Cry
บันทึกการเข้า

ขายรายชื่ออีเมล์ รายชื่ออีเมล์คนไทย คุณภาพ ใช้งานได้จริง จากฐานข้อมูลการสมัครสมาชิกเว็บไซต์และบริการ ไม่ได้ใช้โปรแกรมดูด
เคสกันน้ำ Samsung Galaxy note 4 เคสกันน้ำ note 4 เคสกันน้ำ note 4
lifeproof เคสกันน้ำ lifeproof
Casanova
ก๊วนเสียว
*

พลังน้ำใจ: 9
ออฟไลน์ ออฟไลน์

กระทู้: 213



ดูรายละเอียด
« ตอบ #4 เมื่อ: 10 ตุลาคม 2008, 05:11:54 »

ผมคิดว่าที่ใส่ " " ไว้เผื่อกรณีที่ลิงก์มีวรรคมากกว่า
บันทึกการเข้า

« แก้ไขครั้งสุดท้าย: วันไหน เวลา 28:62:90 AM/PM โดย Casanova »
chareonwong
สมุนแก๊งเสียว
*

พลังน้ำใจ: 11
ออฟไลน์ ออฟไลน์

กระทู้: 787



ดูรายละเอียด
« ตอบ #5 เมื่อ: 10 ตุลาคม 2008, 07:42:12 »

ผมก็ใช้แบบที่ 2 ครับ
บันทึกการเข้า

baby-bride
สมุนแก๊งเสียว
*

พลังน้ำใจ: 28
ออฟไลน์ ออฟไลน์

กระทู้: 543



ดูรายละเอียด เว็บไซต์
« ตอบ #6 เมื่อ: 10 ตุลาคม 2008, 08:00:49 »

   ผมว่ามันจะผ่าน W3c หรือ แบบที่ 2 ไม่เคยลอง ทอสอบ

   อ้างอิง:
อ้างถึง
12.2 The A element

<!ELEMENT A - - (%inline;)* -(A)       -- anchor -->
<!ATTLIST A
  %attrs;                              -- %coreattrs, %i18n, %events --
  charset     %Charset;      #IMPLIED  -- char encoding of linked resource --
  type        %ContentType;  #IMPLIED  -- advisory content type --
  name        CDATA          #IMPLIED  -- named link end --
  href        %URI;          #IMPLIED  -- URI for linked resource --
  hreflang    %LanguageCode; #IMPLIED  -- language code --
  rel         %LinkTypes;    #IMPLIED  -- forward link types --
  rev         %LinkTypes;    #IMPLIED  -- reverse link types --
  accesskey   %Character;    #IMPLIED  -- accessibility key character --
  shape       %Shape;        rect      -- for use with client-side image maps --
  coords      %Coords;       #IMPLIED  -- for use with client-side image maps --
  tabindex    NUMBER         #IMPLIED  -- position in tabbing order --
  onfocus     %Script;       #IMPLIED  -- the element got the focus --
  onblur      %Script;       #IMPLIED  -- the element lost the focus --
  >

Start tag: required, End tag: required

Attribute definitions

name = cdata [CS]
    This attribute names the current anchor so that it may be the destination of another link. The value of this attribute must be a unique anchor name. The scope of this name is the current document. Note that this attribute shares the same name space as the id attribute.
href = uri [CT]
    This attribute specifies the location of a Web resource, thus defining a link between the current element (the source anchor) and the destination anchor defined by this attribute.
hreflang = langcode [CI]
    This attribute specifies the base language of the resource designated by href and may only be used when href is specified.
type = content-type [CI]
    This attribute gives an advisory hint as to the content type of the content available at the link target address. It allows user agents to opt to use a fallback mechanism rather than fetch the content if they are advised that they will get content in a content type they do not support.
    Authors who use this attribute take responsibility to manage the risk that it may become inconsistent with the content available at the link target address.
    For the current list of registered content types, please consult [MIMETYPES].
rel = link-types [CI]
    This attribute describes the relationship from the current document to the anchor specified by the href attribute. The value of this attribute is a space-separated list of link types.
rev = link-types [CI]
    This attribute is used to describe a reverse link from the anchor specified by the href attribute to the current document. The value of this attribute is a space-separated list of link types.
charset = charset [CI]
    This attribute specifies the character encoding of the resource designated by the link. Please consult the section on character encodings for more details.

Attributes defined elsewhere

    * id, class (document-wide identifiers)
    * lang (language information), dir (text direction)
    * title (element title)
    * style (inline style information )
    * shape and coords (image maps)
    * onfocus, onblur, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup (intrinsic events )
    * target (target frame information)
    * tabindex (tabbing navigation)
    * accesskey (access keys)

Each A element defines an anchor

   1. The A element's content defines the position of the anchor.
   2. The name attribute names the anchor so that it may be the destination of zero or more links (see also anchors with id).
   3. The href attribute makes this anchor the source anchor of exactly one link.

Authors may also create an A element that specifies no anchors, i.e., that doesn't specify href, name, or id. Values for these attributes may be set at a later time through scripts.

In the example that follows, the A element defines a link. The source anchor is the text "W3C Web site" and the destination anchor is "http://www.w3.org/ ":

For more information about W3C, please consult the
<A href="http://www.w3.org/ ">W3C Web site</A>.

This link designates the home page of the World Wide Web Consortium. When a user activates this link in a user agent, the user agent will retrieve the resource, in this case, an HTML document.

User agents generally render links in such a way as to make them obvious to users (underlining, reverse video, etc.). The exact rendering depends on the user agent. Rendering may vary according to whether the user has already visited the link or not. A possible visual rendering of the previous link might be:

For more information about W3C, please consult the W3C Web site.
                                                   ~~~~~~~~~~~~

To tell user agents explicitly what the character encoding of the destination page is, set the charset attribute:

For more information about W3C, please consult the
<A href="http://www.w3.org/ " charset="ISO-8859-1">W3C Web site</A>

Suppose we define an anchor named "anchor-one" in the file "one.html".

...text before the anchor...
<A name="anchor-one">This is the location of anchor one.</A>
...text after the anchor...

This creates an anchor around the text "This is the location of anchor one.". Usually, the contents of A are not rendered in any special way when A defines an anchor only.

Having defined the anchor, we may link to it from the same or another document. URIs that designate anchors contain a "#" character followed by the anchor name (the fragment identifier). Here are some examples of such URIs:

    * An absolute URI: http://www.mycompany.com/one.html#anchor-one
    * A relative URI: ./one.html#anchor-one or one.html#anchor-one
    * When the link is defined in the same document: #anchor-one

Thus, a link defined in the file "two.html" in the same directory as "one.html" would refer to the anchor as follows:

...text before the link...
For more information, please consult <A href="./one.html#anchor-one"> anchor one</A>.
...text after the link...

The A element in the following example specifies a link (with href) and creates a named anchor (with name) simultaneously:

I just returned from vacation! Here's a
<A name="anchor-two"
   href="http://www.somecompany.com/People/Ian/vacation/family.png ">
photo of my family at the lake.</A>.

This example contains a link to a different type of Web resource (a PNG image). Activating the link should cause the image resource to be retrieved from the Web (and possibly displayed if the system has been configured to do so).

Note. User agents should be able to find anchors created by empty A elements, but some fail to do so. For example, some user agents may not find the "empty-anchor" in the following HTML fragment:

<A name="empty-anchor"></A>
<EM>...some HTML...</EM>
<A href="#empty-anchor">Link to empty anchor</A>

12.2.1 Syntax of anchor names

An anchor name is the value of either the name or id attribute when used in the context of anchors. Anchor names must observe the following rules:

    * Uniqueness: Anchor names must be unique within a document. Anchor names that differ only in case may not appear in the same document.
    * String matching: Comparisons between fragment identifiers and anchor names must be done by exact (case-sensitive) match.

Thus, the following example is correct with respect to string matching and must be considered a match by user agents:

<P><A href="#xxx">...</A>
...more document...
<P><A name="xxx">...</A>

ILLEGAL EXAMPLE:
The following example is illegal with respect to uniqueness since the two names are the same except for case:

<P><A name="xxx">...</A>
<P><A name="XXX">...</A>

Although the following excerpt is legal HTML, the behavior of the user agent is not defined; some user agents may (incorrectly) consider this a match and others may not.

<P><A href="#xxx">...</A>
...more document...
<P><A name="XXX">...</A>

Anchor names should be restricted to ASCII characters. Please consult the appendix for more information about non-ASCII characters in URI attribute values.
บันทึกการเข้า

หน้า: [1]   ขึ้นบน
พิมพ์