Page 1 of 1

a 태그에서 title 속성 값에 줄바꿈..

Posted: 2004 10 19 13:02 34
by lacovnk
a 태그에서 title 속성을 주면, 툴팁이 뜹니다.

이때, ""로 쌓인 값 중간에 줄바꿈(\n)이 있으면

IE는 툴팁이 세로로 확장되는 반면에, firefox는 특수문자로 깨져서 보이는군요;

원래 표준이 아닌 것인가요?;

CR하고 LF는....

Posted: 2004 10 19 16:40 07
by 파란사오정

Code: Select all

HTML 4.01문서에서
----------------------------

6.2 SGML basic types

The document type definition specifies the syntax of HTML element content and attribute values using SGML tokens (e.g., PCDATA, CDATA, NAME, ID, etc.). See [ISO8879] for their full definitions. The following is a summary of key information:

    * CDATA is a sequence of characters from the document character set and may include character entities. User agents should interpret attribute values as follows:
          o Replace character entities with characters,
          o Ignore line feeds,
          o Replace each carriage return or tab with a single space.


.............중략............

6.3 Text strings

A number of attributes ( %Text; in the DTD) take text that is meant to be "human readable". For introductory information about attributes, please consult the tutorial discussion of attributes.


.............중략............


7.4.3 The title attribute

Attribute definitions

title = text [CS]
    This attribute offers advisory information about the element for which it is set.

.............중략............

Code: Select all

DTD 문서에서
--------------------------

<!ENTITY % Text "CDATA">


HTML4.01문서를 보니,
title 애트리뷰트는 Text형식이고 Text형식은 CDATA 형식이고
CDATA에서는 LF는 무시하고 CR는 한개의 공백으로 처리한다고 되어 있네요...

쩝~~~Firefox는 좀 엄격하다는....