Living Standard â Last Updated 1 September 2026
sourceãimgããã³link èŠçŽ ã®å
±é屿§ãã®ç¯ã¯éèŠç¯çã§ããã
åç¬ã®ç»åãªãœãŒã¹ã®ã¿ãååšããå ŽåãHTMLã«ãããŠç»åãåã蟌ãããã«ãimgèŠçŽ ããã³src屿§ã䜿çšããã
< h2 > From today's featured article</ h2 >
< img src = "/uploads/100-marie-lloyd.jpg" alt = "" width = "100" height = "150" >
< p >< b >< a href = "/wiki/Marie_Lloyd" > Marie Lloyd</ a ></ b > (1870â1922)
was an English < a href = "/wiki/Music_hall" > music hall</ a > singer, ...
ãããããŠãŒã¶ãŒãšãŒãžã§ã³ããéžæããããšãã§ããè€æ°ã®ç»åãªãœãŒã¹ãçšããããšãèè ãæããããããªã倿°ã®ç¶æ³ãååšããïŒ
ç°ãªããŠãŒã¶ãŒãç°ãªãç°å¢ç¹æ§ãæã€ãããããªãïŒ
ãŠãŒã¶ãŒã®ç©çã¹ã¯ãªãŒã³ãµã€ãºã¯ä»ã®ãã®ãšç°ãªããããããªãã
ã©ãããããã®ã¹ã¯ãªãŒã³ã¯14ã€ã³ãåã§ãããããããªãäžæ¹ã§ãæºåž¯é»è©±ã®ã¹ã¯ãªãŒã³ã¯4ã€ã³ãåã§ãããããããªãã
ç»åã®ã¬ã³ããªã³ã°ãµã€ãºããã¥ãŒããŒãã«äŸåããå Žåãããã¯åã«é¢é£ããã ãã§ããã
ãŠãŒã¶ãŒã®ã¹ã¯ãªãŒã³ãã¯ã»ã«å¯åºŠã¯ãå¥ã®ã¹ã¯ãªãŒã³ãšç°ãªããããããªãã
æºåž¯é»è©±ã®ã¹ã¯ãªãŒã³ã¯ãç©çã¹ã¯ãªãŒã³ãµã€ãºã«é¢ããããå¥ã®æºåž¯é»è©±ã®ã¹ã¯ãªãŒã³ãšæ¯èŒããŠã€ã³ããããç©çãã¯ã»ã«ãšããŠ3åã«ãªããããããªãã
ãŠãŒã¶ãŒã®ãºãŒã ã¬ãã«ã¯å¥ã®ãã®ãšç°ãªãããããããæéãšãšãã«åç¬ã®ãŠãŒã¶ãŒã«å¯ŸããŠå€åãããããããªãã
ãŠãŒã¶ãŒã¯ãç¹å®ã®ç»åã®è©³çްãèŠãããã«ãºãŒã ãããããããªãã
ãºãŒã ã¬ãã«ããã³ã¹ã¯ãªãŒã³ãã¯ã»ã«å¯åºŠïŒåã®ãã€ã³ãïŒã¯ãCSSãã¯ã»ã«å¯åºŠããã倿°ã®ç©çã¹ã¯ãªãŒã³ãã¯ã»ã«ã«åœ±é¿ãäžããããšãã§ããããã®æ¯çã¯ãäžè¬ã«ããã€ã¹ãã¯ã»ã«æ¯ãšããŠåç §ãããã
ãŠãŒã¶ãŒã®ã¹ã¯ãªãŒã³æ¹åã¯å¥ã®ãã®ãšç°ãªãããããããæéãšãšãã«åç¬ã®ãŠãŒã¶ãŒã«å¯ŸããŠå€åãããããããªãã
ã¿ãã¬ããã¯çžŠåãŸãã¯90床å転ããŠåºå®ãããããšãã§ãããã®çµæã¹ã¯ãªãŒã³ã¯ã"瞊é·"ïŒportraitïŒãŸãã¯"暪é·"ïŒlandscapeïŒã®ãããããšãªãã
ãŠãŒã¶ãŒã®ãããã¯ãŒã¯é床ããããã¯ãŒã¯ã¬ã€ãã³ã·ããã³åž¯åå¹ ã³ã¹ãã¯ç°ãªãããããããæéãšãšãã«åç¬ã®ãŠãŒã¶ãŒã«å¯ŸããŠå€åãããããããªãã
ãŠãŒã¶ãŒã¯ãä»äºã§äœã¬ã€ãã³ã·ããã³äžå®ã³ã¹ãæ¥ç¶ã®é«éãããããªãããå®¶ã§äœã¬ã€ãã³ã·ããã³äžå®ã³ã¹ãæ¥ç¶ã®äœéãããããªãããä»ã®å Žæã§é«ã¬ã€ãã³ã·ããã³å¯å€ã³ã¹ãæ¥ç¶ã®é床å€åãããããªãã
èè ã¯ããã¥ãŒããŒãã®å¹ ã«äŸåããŠãåãç»åã ãç°ãªãã¬ã³ããªã³ã°ãµã€ãºã衚瀺ããããããããªããããã¯éåžžãã¥ãŒããŒãããŒã¹ã®éžæãšããŠåç §ãããã
ãŠã§ãããŒãžã¯ãåžžã«å šäœã®ãã¥ãŒããŒãå¹ ã«åã¶ãäžçªäžã®ãããŒãæã€ãããããªãããã®å Žåãç»åã®ã¬ã³ããªã³ã°ãµã€ãºã¯ã¹ã¯ãªãŒã³ã®ç©çãµã€ãºã«äŸåããïŒæå€§åããããã©ãŠã¶ãŒãŠã£ã³ããŠãä»®å®ããïŒã
å¥ã®ãŠã§ãããŒãžã¯ãå°ããªç©çãµã€ãºããã€ã¹ã¯ãªãŒã³ã«å¯ŸããåãäžçšåºŠã®ç©çãµã€ãºããã€ã¹ã¯ãªãŒã³ã«å¯Ÿããåã倧ããªç©çãµã€ãºããã€ã¹ã¯ãªãŒã³ã«å¯Ÿããåããšããªãããã¥ãŒããŒããåããåã±ãŒã¹ã«ãããŠã¬ã³ããªã³ã°ãµã€ãºã®å€åããç»åããã€ãåã«ãããç»åãæã€ãããããªãããã®å Žåãç»åã®ã¬ã³ããªã³ã°ãµã€ãºã¯ãã¹ã¯ãªãŒã³ãããå°ããã«ããããããã2åã¬ã€ã¢ãŠããšæ¯èŒããŠ1åã¬ã€ã¢ãŠãã§ãã倧ãããªããããããªãã
èè ã¯ãç»åã®ã¬ã³ããªã³ã°ãµã€ãºæ¬¡ç¬¬ã§ç°ãªãç»åã³ã³ãã³ãã衚瀺ããããããããªããããã¯éåžžart directionãšããŠåç §ãããã
ãŠã§ãããŒãžã倧ããªç©çãµã€ãºïŒæå€§åããããã©ãŠã¶ãŒãŠã£ã³ããŠãšä»®å®ããïŒããã€ã¹ã¯ãªãŒã³ã§èŠãããå Žåãèè ã¯ç»åã®éèŠãªéšåãå²ãããŸãé¢é£ããªãéšåãå«ãããšãæããããããªãããŠã§ãããŒãžãå°ããªãªç©çãµã€ãºããã€ã¹ã¯ãªãŒã³ã§èŠãããå Žåãèè ã¯ç»åã®éèŠãªéšåã®ã¿ã衚瀺ããããšãæããããããªãã
èè ã¯ããŠãŒã¶ãŒãšãŒãžã§ã³ãããµããŒãããç»åãã©ãŒãããã«å¿ããŠãåãç»åã³ã³ãã³ãã ãç°ãªãç»åãã©ãŒãããã衚瀺ããããããããªããããã¯éåžžç»åãã©ãŒãããããŒã¹ã®éžæãšããŠåç §ãããã
ãŠã§ãããŒãžã¯ãJPEGãJPEGãšæ¯èŒããŠããå§çž®èœåã®ããWebPããã³JPEG XRãã©ãŒãããã§ç»åãæã€ãããããªããç°ãªããŠãŒã¶ãŒãšãŒãžã§ã³ãã¯ãããããå§çž®æ¯ãæäŸãããã©ãŒãããããã€ãç°ãªãç»åãã©ãŒãããããµããŒãããããšãã§ããããããµããŒãããªããŠãŒã¶ãŒãšãŒãžã§ã³ãã«å¯ŸããŠJPEGãã©ãŒã«ããã¯ãæäŸããäžæ¹ã§ãèè ã¯ãã©ãŒãããããµããŒããããŠãŒã¶ãŒãšãŒãžã§ã³ãã«å¯ŸããŠãããããã©ãŒããããé ä¿¡ãããã ããã
äžèšã®ç¶æ³ã¯ãçžäºã«æä»çã§ã¯ãªããããšãã°ãart directionã«å¯Ÿããç°ãªããªãœãŒã¹ããã€ç°ãªãããã€ã¹ãã¯ã»ã«æ¯ãç°ãªããªãœãŒã¹ãçµã¿åãããããšã¯çã«ããªã£ãŠããã
ã¹ã¯ãªããã䜿çšããããšã§ãããåé¡ã解決ããããšã¯å¯èœã§ããéããã®ããã«ããããšã¯ä»ã®åé¡ãå°å ¥ããïŒ
ãŠã§ãããŒãžãããã«èªã¿èŸŒã¿å®äºããããã«ãã¹ã¯ãªãããå®è¡ããæ©äŒãæã€åã«ãäžéšã®ãŠãŒã¶ãŒãšãŒãžã§ã³ãã¯ãHTMLããŒã¯ã¢ããã§æå®ãããç»åãç©æ¥µçã«ããŠã³ããŒããããã¹ã¯ãªãããããŠã³ããŒãããç»åã倿Žããå ŽåãããæªãããŒãžèªã¿èŸŒã¿ããã©ãŒãã³ã¹ãåŒãèµ·ããããšãã§ããããŠã³ããŒãã®ä»£ããã«ããŠãŒã¶ãŒãšãŒãžã§ã³ãã¯ããŠã³ããŒããåé¢ãã2ã€ãæœåšçã«éå§ããã ããã
èè ãHTMLããŒã¯ã¢ããã§ä»»æã®ç»åã®æå®ãé¿ãããã€ã¹ã¯ãªããããåäžã®ããŠã³ããŒãã代ããã«å®äŸã瀺ãå Žåãããã¯äžèšã®2åã®ããŠã³ããŒãåé¡ãåé¿ããããç¡å¹ã«ãããã¹ã¯ãªããããã€ãŠãŒã¶ãŒã«å¯ŸããŠç»åãäžåããŠã³ããŒãããããã€ç©æ¥µçãªç»åããŠã³ããŒãæé©åãç¡å¹ã«ãããã
ãã®ããšãèæ ®ããŠããã®ä»æ§ã¯å®£èšããæ¹æ³ã§äžèšã®åé¡ãç³ãç«ãŠãããã®å€æ°ã®æ©èœãå°å ¥ããã
imgèŠçŽ ã®srcããã³srcsetã¯ãïŒããå°ãããµã€ãºããã倧ããç»åã®ã¹ã±ãŒã«ããŠã³ããŒãžã§ã³ãšãªãïŒç»åãµã€ãºã§å€åããã®ã¿ã®è€æ°ã®ç»åãæäŸããããã«xèšè¿°åãçšããŠäœ¿çšããããšãã§ããã
ç»åã®ã¬ã³ããªã³ã°ãµã€ãºããã¥ãŒããŒãå¹
ã«äŸåããå ŽåïŒãã¥ãŒããŒãããŒã¹ã®éžæïŒãxèšè¿°åã¯é©ããªãããart directionãšäžç·ã«äœ¿çšããããšãã§ããã
< h2 > From today's featured article</ h2 >
< img src = "/uploads/100-marie-lloyd.jpg"
srcset = "/uploads/150-marie-lloyd.jpg 1.5x, /uploads/200-marie-lloyd.jpg 2x"
alt = "" width = "100" height = "150" >
< p >< b >< a href = "/wiki/Marie_Lloyd" > Marie Lloyd</ a ></ b > (1870â1922)
was an English < a href = "/wiki/Music_hall" > music hall</ a > singer, ...
ãŠãŒã¶ãŒãšãŒãžã§ã³ãã¯ããŠãŒã¶ãŒã®ã¹ã¯ãªãŒã³ã®ãã¯ã»ã«å¯åºŠããºãŒã ã¬ãã«ããã³ãŠãŒã¶ãŒã®ãããã¯ãŒã¯ç¶æ ã®ãããªå¯èœæ§ã®ãããã®ä»ã®èŠçŽ ã«äŸåããäžãããããªãœãŒã¹ã®ã©ãã§ãéžæããããšãã§ããã
srcset屿§ãè§£éããªãå€ããŠãŒã¶ãŒãšãŒãžã§ã³ãã®åŸæ¹äºææ§ã®ããã«ãURLã®1ã€ã¯ãimgèŠçŽ ã®src屿§ã§æå®ããããããã¯ïŒãŠãŒã¶ãŒã奜ããããããããããšäœãè§£å床ã ããã©ãïŒå€ããŠãŒã¶ãŒãšãŒãžã§ã³ãã«ãããŠããã衚瀺ããããšããäœããã圹ã«ç«ã€çµæã«ãªãã ãããæ°ãããŠãŒã¶ãŒãšãŒãžã§ã³ãã«å¯ŸããŠããããã屿§ã1xèšè¿°åãšãšãã«srcsetã§æå®ããããã®ããã«ãsrc屿§ã¯ãªãœãŒã¹éžæã«åå ããã
ç»åã®ã¬ã³ããªã³ã°ãµã€ãºã¯ãç»åãããŠã³ããŒããããåã«ç»åã«å¯Ÿãã空éãå²ãåœãŠãããšããŠãŒã¶ãŒãšãŒãžã§ã³ãã«ã§ããwidthããã³height屿§ã§äžããããã
srcsetããã³sizesã¯ãïŒããå°ãããµã€ãºããã倧ããç»åã®ã¹ã±ãŒã«ããŠã³ããŒãžã§ã³ãšãªãïŒç»åãµã€ãºã§å€åããã®ã¿ã®è€æ°ã®ç»åãæäŸããããã«wèšè¿°åãçšããŠäœ¿çšããããšãã§ããã
ãã®äŸã«ãããŠããããŒç»åã¯ïŒé©åãªCSSãçšããŠïŒãã¥ãŒããŒãå¹ å šäœãåãã
< h1 >< img sizes = "100vw" srcset = "wolf-400.jpg 400w, wolf-800.jpg 800w, wolf-1600.jpg 1600w"
src = "wolf-400.jpg" alt = "The rad wolf" ></ h1 >
ãŠãŒã¶ãŒãšãŒãžã§ã³ãã¯ãæå®ãããwèšè¿°åããã³sizes屿§ã§æå®ãããã¬ã³ããªã³ã°ãµã€ãºããåç»åã®å¹æçãªãã¯ã»ã«å¯åºŠãç®åºããã ããã ãŠãŒã¶ãŒãšãŒãžã§ã³ãã¯ããŠãŒã¶ãŒã®ã¹ã¯ãªãŒã³ã®ãã¯ã»ã«å¯åºŠããºãŒã ã¬ãã«ããã³ãŠãŒã¶ãŒã®ãããã¯ãŒã¯ç¶æ
ã®ãããªå¯èœæ§ã®ãããã®ä»ã®èŠçŽ ã«äŸåããäžãããããªãœãŒã¹ã®ã©ãã§ãéžæããããšãã§ããã
ãŠãŒã¶ãŒã®ã¹ã¯ãªãŒã³ã320 CSSãã¯ã»ã«å¹
ã§ããå Žåãããã¯wolf-400.jpg 1.25x, wolf-800.jpg 2.5x, wolf-1600.jpg 5xã«æå®ããã®ãšç䟡ã§ãããèšãæãããšããŠãŒã¶ãŒã®ã¹ã¯ãªãŒã³1200 CSSãã¯ã»ã«å¹
ã§ããå Žåãããã¯wolf-400.jpg 0.33x, wolf-800.jpg 0.67x, wolf-1600.jpg 1.33xã«æå®ããã®ãšç䟡ã§ãããwèšè¿°åããã³sizes屿§ã䜿çšããããšã«ãã£ãŠããŠãŒã¶ãŒãšãŒãžã§ã³ãã¯ãŠãŒã¶ãŒã®ããã€ã¹ã®å€§ããã«ããããããããŠã³ããŒãããæ£ç¢ºãªç»åãªãœãŒã¹ãéžæããããšãã§ããã
åŸæ¹äºææ§ã®ããã«ãURLã®1ã€ã¯imgèŠçŽ ã®src屿§ã§æå®ããããæ°ãããŠãŒã¶ãŒãšãŒãžã§ã³ãã«ãããŠãsrcset屿§ãwèšè¿°åã䜿çšããå Žåãsrc屿§ã¯ç¡èŠãããã
ãã®äŸã«ãããŠããŠã§ãããŒãžã¯ãã¥ãŒããŒãã®å¹
ã«äŸåãã3ã€ã®ã¬ã€ã¢ãŠããæã€ãçãã¬ã€ã¢ãŠãã¯1åç®ã®ç»åïŒåç»åã®å¹
ãçŽ100%ïŒãäžçšåºŠã®ã¬ã€ã¢ãŠãã¯2åç®ã®ç»åïŒåç»åã®å¹
ãçŽ50%ïŒãåºãã¬ã€ã¢ãŠãã¯3åç®ã®ç»åïŒåç»åã®å¹
ãçŽ33%ïŒãããã³ããŒãžããŒãžã³ãæã€ããã¥ãŒããŒããããããå¹
30emããã³å¹
50emã§ããå Žåããããã®ã¬ã€ã¢ãŠããå£ãã
< img sizes = "(max-width: 30em) 100vw, (max-width: 50em) 50vw, calc(33vw - 100px)"
srcset = "swing-200.jpg 200w, swing-400.jpg 400w, swing-800.jpg 800w, swing-1600.jpg 1600w"
src = "swing-400.jpg" alt = "Kettlebell Swing" >
sizes屿§ã¯ã30emããã³50emã§ã¬ã€ã¢ãŠãã®ãã¬ãŒã¯ãã€ã³ããèšå®ããããããã¬ãŒã¯ãã€ã³ãã®éã§ 100vwã50vwãŸãã¯calc(33vw - 100px)ã«ç»åãµã€ãºã宣èšãããããããµã€ãºã¯ãCSSã§æå®ãããããã«å®éã®ç»åå¹
ãšå³å¯ã«ãããããå¿
èŠãå¿
ç¶çã«ãªãã
ãŠãŒã¶ãŒãšãŒãžã§ã³ãã¯ãtrueã«è©äŸ¡ãã<media-condition>ïŒäžžæ¬åŒ§ã®äžéšïŒããã€æåã®é
ç®ãçšããããŸãã¯ããããfalseã«ãã¹ãŠè©äŸ¡ããå ŽåãæåŸã®é
ç®ïŒcalc(33vw - 100px)ïŒãçšããŠãsizes屿§ããå¹
ãéžã¶ã ããã
ããšãã°ããã¥ãŒããŒãå¹
ã29emã§ããå Žåã(max-width: 30em)ãtrueã«è©äŸ¡ã100vwã䜿çšããçµæãšããŠããªãœãŒã¹éžæã®ç®çã§ç»åãµã€ãºã¯29emã§ããããã¥ãŒããŒãå¹
ã代ããã«32emã§ããå Žåã(max-width: 30em)ã¯falseã«è©äŸ¡ãããã(max-width: 50em)ã¯trueã«è©äŸ¡ãã50vwã䜿çšããçµæãšããŠããªãœãŒã¹éžæã®ç®çã§ç»åã®ãµã€ãºã¯16emïŒãã¥ãŒããŒãå¹
ã®ååïŒãšãªããç°ãªãã¬ã€ã¢ãŠãã®ããããããã«ããå¹
ã®åºããã¥ãŒããŒããããå°ããç»åãããããããšã«æ³šç®ããã
ãŠãŒã¶ãŒãšãŒãžã§ã³ãã¯ã广çãªãã¯ã»ã«å¯åºŠãéžæããåã®äŸãšäŒŒãé©åãªãªãœãŒã¹ãéžæããããšãã§ããã
ãã®äŸã¯åã®äŸãšåãã§ããããç»åãlazy-loadedã§ããç¹ãç°ãªãããã®å Žåãsizes屿§ã¯autoããŒã¯ãŒãã䜿çšã§ãããŠãŒã¶ãŒãšãŒãžã§ã³ãã¯source sizeã«width屿§ïŒãŸãã¯CSSã§æå®ãããå¹
ïŒã䜿çšããã
< img loading = "lazy" width = "200" height = "200" sizes = "auto"
srcset = "swing-200.jpg 200w, swing-400.jpg 400w, swing-800.jpg 800w, swing-1600.jpg 1600w"
src = "swing-400.jpg" alt = "Kettlebell Swing" >
autoããŒã¯ãŒãããµããŒãããŠããªãã¬ã¬ã·ãŒãŠãŒã¶ãšãŒãžã§ã³ããšã®åŸæ¹äºææ§ãåäžãããããã«ãå¿
èŠã«å¿ããŠãã©ãŒã«ããã¯ãµã€ãºãæå®ã§ããã
< img loading = "lazy" width = "200" height = "200"
sizes = "auto, (max-width: 30em) 100vw, (max-width: 50em) 50vw, calc(33vw - 100px)"
srcset = "swing-200.jpg 200w, swing-400.jpg 400w, swing-800.jpg 800w, swing-1600.jpg 1600w"
src = "swing-400.jpg" alt = "Kettlebell Swing" >
media屿§ãšå
±ã«pictureèŠçŽ ããã³sourceèŠçŽ ã¯ãïŒããšãã°ããå°ããç»åããã倧ããç»åã®åç©«ãããããŒãžã§ã³ãããããªãïŒç»åã³ã³ãã³ããå€åãããè€æ°ã®ç»åãæäŸããããã«äœ¿çšããããšãã§ããã
< picture >
< source media = "(min-width: 45em)" srcset = "large.jpg" >
< source media = "(min-width: 32em)" srcset = "med.jpg" >
< img src = "small.jpg" alt = "The wolf runs through the snow." >
</ picture >
ãŠãŒã¶ãŒãšãŒãžã§ã³ããmedia屿§ã«ãããã¡ãã£ã¢ã¯ãšãªãŒããããããæåã®sourceèŠçŽ ãéžæããèŠçŽ ã®srcset屿§ããé©åãªURLãéžæããã
ç»åã®ã¬ã³ããªã³ã°ãµã€ãºã¯ããœãŒã¹ãéžæããããã®ã«äŸåããŠå€åãããããŠã³ããŒããããç»åãæã€åã«ãŠãŒã¶ãŒãšãŒãžã§ã³ãã䜿çšããããšãã§ããæ¬¡å ãæå®ããããã«ãCSSã¯äœ¿çšããããšãã§ããã
img { width : 300 px ; height : 300 px }
@media ( min-width: 32em) { img { width: 500px; height:300px } }
@media (min-width: 45em) { img { width: 700px; height:400px } }
ãã®äŸã¯ãart directionããã³ããã€ã¹ãã¯ã»ã«æ¯ããŒã¹ã®éžæãçµã¿åãããããã¥ãŒããŒãã®ååãåããããŒã¯ã1ã€ã¯åºãã¹ã¯ãªãŒã³ã«å¯ŸããŠã1ã€ã¯çãã¹ã¯ãªãŒã³ã«å¯ŸããŠã®ã2ã€ã®ããŒãžã§ã³ã§æäŸãããã
< h1 >
< picture >
< source media = "(max-width: 500px)" srcset = "banner-phone.jpeg, banner-phone-HD.jpeg 2x" >
< img src = "banner.jpeg" srcset = "banner-HD.jpeg 2x" alt = "The Breakfast Combo" >
</ picture >
</ h1 >
sourceèŠçŽ ã®type屿§ã¯ãç°ãªããã©ãŒãããã§è€æ°ã®ç»åãæäŸããããã«äœ¿çšããããšãã§ããã
< h2 > From today's featured article</ h2 >
< picture >
< source srcset = "/uploads/100-marie-lloyd.webp" type = "image/webp" >
< source srcset = "/uploads/100-marie-lloyd.jxr" type = "image/vnd.ms-photo" >
< img src = "/uploads/100-marie-lloyd.jpg" alt = "" width = "100" height = "150" >
</ picture >
< p >< b >< a href = "/wiki/Marie_Lloyd" > Marie Lloyd</ a ></ b > (1870â1922)
was an English < a href = "/wiki/Music_hall" > music hall</ a > singer, ...
ãã®äŸã«ãããŠããŠãŒã¶ãŒãšãŒãžã§ã³ãã¯ããµããŒããããMIMEã¿ã€ãããã€type屿§ãæã€æåã®ãªãœãŒã¹ãéžæããããŠãŒã¶ãŒãšãŒãžã§ã³ããWebPç»åããµããŒãããå Žåãæåã®sourceèŠçŽ ãéžæããããWebPç»åããµããŒãããªããããŠãŒã¶ãŒãšãŒãžã§ã³ããJPEG XRç»åããµããŒãããå Žåã2ã€ç®ã®sourceèŠçŽ ãéžæãããããããã®ãã©ãŒãããããããããµããŒããããªãå ŽåãimgèŠçŽ ãéžæãããã
ãã®ç¯ã¯éèŠç¯çã§ããã
CSSããã³ã¡ãã£ã¢ã¯ãšãªãŒã¯ãå
·äœçã«ã¯ç°ãªããã¥ãŒããŒãã®æ¬¡å
ããã³ç»çŽ å¯åºŠã§ããŠãŒã¶ãŒã®ç°å¢ã«åçã«é©å¿ããã°ã©ãã£ã«ã«ãªããŒãžã¬ã€ã¢ãŠããæ§ç¯ããããã«äœ¿çšããããšãã§ããããããã³ã³ãã³ãã«å¯ŸããŠãCSSã¯å©ãã«ãªããªãã代ããã«ãimgèŠçŽ ã®srcset屿§ããã³pictureèŠçŽ ãããããã®ç¯ã¯ããã®æ©èœã䜿çšããæ¹æ³ã瀺ããµã³ãã«äŸãæž¡ãæ©ãã
ïŒ600 CSSãã¯ã»ã«ããåºãïŒå€§ããªç»é¢ã§a-rectangle.pngãšããååã®300Ã150ã®ç»åã䜿çšãããäžæ¹ã§ãïŒ600 CSSãã¯ã»ã«ããå°ããïŒå°ããªç»é¢ã§a-square.pngãšããååã®100Ã100ã®ç»åã䜿çšãããç¶æ³ãèããŠã¿ããããã®å Žåã®ããŒã¯ã¢ããã¯æ¬¡ã®ããã«ãªãïŒ
< figure >
< picture >
< source srcset = "a-square.png" media = "(max-width: 600px)" >
< img src = "a-rectangle.png" alt = "Barney Frank wears a suit and glasses." >
</ picture >
< figcaption > Barney Frank, 2011</ figcaption >
</ figure >
alt屿§ã®äžã«å
¥ãããã®ã®è©³çްã«ã€ããŠã¯ãç»åã®ä»£æ¿ãšããŠæ©èœããããã¹ããæäŸããããã®èŠä»¶ã®ç¯ãåç
§ã®ããšã
ããã«äŒŽãåé¡ã¯ããŠãŒã¶ãŒãšãŒãžã§ã³ãããç»åãèªã¿èŸŒãŸãããšãã«ç»åã«äœ¿çšããæ¬¡å ãäœãå¿ ãããåãããªããšããããšã§ãããããŒãžãèªã¿èŸŒãŸããæäžã«ãè€æ°åã®ãªãããŒãããã¬ã€ã¢ãŠããåé¿ããããã«ãCSSããã³CSSã¡ãã£ã¢ã¯ãšãªãŒã¯ã次å ãæäŸããããã«äœ¿çšããããšãã§ããïŒ
< style >
# a { width : 300 px ; height : 150 px ; }
@ media ( max-width : 600px ) { # a { width : 100 px ; height : 100 px ; } }
</ style >
< figure >
< picture >
< source srcset = "a-square.png" media = "(max-width: 600px)" >
< img src = "a-rectangle.png" alt = "Barney Frank wears a suit and glasses." id = "a" >
</ picture >
< figcaption > Barney Frank, 2011</ figcaption >
</ figure >
ãŸããsourceèŠçŽ ããã³imgèŠçŽ ã§widthããã³height屿§ã䜿çšããŠãå¹
ããã³é«ããæå®ããããšãã§ãã
< figure >
< picture >
< source srcset = "a-square.png" media = "(max-width: 600px)" width = "100" height = "100" >
< img src = "a-rectangle.png" width = "300" height = "150"
alt = "Barney Frank wears a suit and glasses." >
</ picture >
< figcaption > Barney Frank, 2011</ figcaption >
</ figure >
imgèŠçŽ ã¯ãpictureèŠçŽ ããµããŒãããªãã¬ã¬ã·ãŒãŠãŒã¶ãŒãšãŒãžã§ã³ãã«äœ¿çšããããã«ç»åã®URLãäžããsrc屿§ãšãšãã«äœ¿çšããããããã¯ãsrc屿§ã§æäŸããããã«ãã®ç»åã®è³ªåã«ã€ãªããã
èè ãã¬ã¬ã·ãŒãŠãŒã¶ãŒãšãŒãžã§ã³ãã§æå€§ã®ç»åãåžæããå ŽåãããŒã¯ã¢ããã¯æ¬¡ã®ããã«ãªãïŒ
< picture >
< source srcset = "pear-mobile.jpeg" media = "(max-width: 720px)" >
< source srcset = "pear-tablet.jpeg" media = "(max-width: 1280px)" >
< img src = "pear-desktop.jpeg" alt = "The pear is juicy." >
</ picture >
ããããã¬ã¬ã·ãŒã¢ãã€ã«ãŠãŒã¶ãŒãšãŒãžã§ã³ããããéèŠã§ããå Žåãå®å
šã«src屿§ãäžæžããããsourceèŠçŽ ã«ãã¹ãŠã®3ã€ã®ç»åãäžèŠ§è¡šç€ºããããšãã§ããã
< picture >
< source srcset = "pear-mobile.jpeg" media = "(max-width: 720px)" >
< source srcset = "pear-tablet.jpeg" media = "(max-width: 1280px)" >
< source srcset = "pear-desktop.jpeg" >
< img src = "pear-mobile.jpeg" alt = "The pear is juicy." >
</ picture >
ãã®æç¹ã§ãå®éã«src屿§ã¯pictureããµããŒããããŠãŒã¶ãŒãšãŒãžã§ã³ãã«ãã£ãŠå®å
šã«ç¡èŠããããããsrc屿§ã¯æå°ã§ãæå€§ã§ããªããã®ãå«ããä»»æã®ç»åãããã©ã«ãã«ããããšãã§ããïŒ
< picture >
< source srcset = "pear-mobile.jpeg" media = "(max-width: 720px)" >
< source srcset = "pear-tablet.jpeg" media = "(max-width: 1280px)" >
< source srcset = "pear-desktop.jpeg" >
< img src = "pear-tablet.jpeg" alt = "The pear is juicy." >
</ picture >
max-widthã¡ãã£ã¢æ©èœã䜿çšãããäžèšã¯ãç»åãæå³ãããæå€§ïŒãã¥ãŒããŒãïŒæ¬¡å
ãäžããã代ããã«min-widthã䜿çšããããšãå¯èœã§ããã
< picture >
< source srcset = "pear-desktop.jpeg" media = "(min-width: 1281px)" >
< source srcset = "pear-tablet.jpeg" media = "(min-width: 721px)" >
< img src = "pear-mobile.jpeg" alt = "The pear is juicy." >
</ picture >
sourceãimgããã³link èŠçŽ ã®å
±é屿§srcset屿§ã¯ããã®ç¯ã§å®çŸ©ãããèŠä»¶ããã€å±æ§ã§ããã
屿§ãååšããå Žåã屿§å€ã¯ãU+002C COMMAæåïŒ,ïŒã§ããããåé¢ããã1ã€ä»¥äžã®ç»ååè£æååããæããªããã°ãªããªããç»ååè£æååãèšè¿°åããã³URLã®åŸã«ASCIIç©ºçœæåãäžåå«ãŸãªãå Žåãæ¬¡ã®ç»ååè£æååãååšãããšãã1ã€ä»¥äžã®ASCIIç©ºçœæåã§éå§ããªããã°ãªããªãã
ç»ååè£æååã¯ã次ã®ãªã¹ãã§èª¬æããã远å ã®å¶éãšãšãã«ãé ã«ã次ã®ã³ã³ããŒãã³ãããæãïŒ
0å以äžã®ASCIIç©ºçœæåã
U+002C COMMAïŒ,ïŒæåã§éå§ãŸãã¯çµäºããªã劥åœãªç©ºã§ãªãURLã§ãéã€ã³ã¿ã©ã¯ãã£ããåç §ããä»»æã§ã¢ãã¡ãŒã·ã§ã³ãããŒãžåãã¹ã¯ãªããåããããªãç»åãªãœãŒã¹ã
0å以äžã®ASCIIç©ºçœæåã
次ã®0ãŸãã¯1ã€ïŒ
ASCIIç©ºçœæåãå¹ èšè¿°åå€ã衚ã0ãã倧ããæ°å€ãäžãã劥åœãªéè² æŽæ°ãããã³U+0077 LATIN SMALL LETTER Wæåããæããå¹ èšè¿°åã
ASCIIç©ºçœæåããã¯ã»ã«å¯åºŠèšè¿°åå€ã衚ã0ãã倧ããæ°å€ãäžãã劥åœãªæµ®åå°æ°ç¹æ°ãããã³U+0078 LATIN SMALL LETTER Xæåããæãããã¯ã»ã«å¯åºŠèšè¿°åã
0å以äžã®ASCIIç©ºçœæåã
åãèŠçŽ ã«å¯ŸããŠå¥ã®ç»ååè£æååã®å¹ èšè¿°åå€ãšåãå¹ èšè¿°åå€ãæã€èŠçŽ ã«å¯Ÿããç»ååè£æååãååšããŠã¯ãªããªãã
åãèŠçŽ ã«å¯ŸããŠå¥ã®ç»ååè£æååã®ãã¯ã»ã«å¯åºŠèšè¿°åå€ãšåããã¯ã»ã«å¯åºŠèšè¿°åå€ãæã€èŠçŽ ã«å¯Ÿããç»ååè£æååãååšããŠã¯ãªããªãããã®èŠæ±ã®ç®çã®ããã«ãèšè¿°åããããªãç»ååè£æååã¯ã1xèšè¿°åããã€ç»ååè£æååãšç䟡ã§ããã
èŠçŽ ã«å¯Ÿããç»ååè£æååãå¹ èšè¿°åãæå®ãããå Žåããã®èŠçŽ ã«å¯Ÿãããã¹ãŠã®ä»ã®ç»ååè£æååãå¹ èšè¿°åãæå®ãããªããã°ãªããªãã
ç»ååè£æååã®å¹ èšè¿°åã«ãããæå®ãããå¹ ã¯ããªãœãŒã¹ãèªç¶å¹ ãæã€å Žåãç»ååè£æååã®URLã«ãã£ãŠæå®ããããªãœãŒã¹ã«ãããèªç¶å¹ ã«ãããããªããã°ãªããªãã
èŠçŽ ãååšããsizes屿§ãæã€å Žåããã®èŠçŽ ã«å¯Ÿãããã¹ãŠã®ç»ååè£æååã¯å¹ èšè¿°åãæå®ãããªããã°ãªããªãã
sizes屿§ã¯ããã®ç¯ã§å®çŸ©ãããèŠä»¶ããã€å±æ§ã§ããã
ååšããå Žåãå€ã¯åŠ¥åœãªãœãŒã¹ãµã€ãºã®ãªã¹ãã§ãªããã°ãªããªãã
劥åœãªãœãŒã¹ãµã€ãºã®ãªã¹ãã¯ãæ¬¡ã®ææ³ã«ãããããæååã§ããïŒ[CSSVALUES] [MQ]
< source-size-list > = < source-size > #? , < source-size-value >
< source-size > = < media-condition > < source-size-value > | auto
< source-size-value > = < length > | auto
<length>ã§ãã<source-size-value>ã¯è² ã§ãã£ãŠã¯ãªãããæ°åŠé¢æ°ä»¥å€ã®CSS颿°ã䜿çšããŠã¯ãªããªãã
ããŒã¯ãŒãautoã¯ã parse width attributeã§èšç®ãããå¹
ã§ãããååšããå Žåãããã¯æåã®ãšã³ããªãŒã§ãªããã°ãªãããå€<source-size-list>å
šäœã¯æåå"auto"ïŒASCII倧æåã»å°æåäžåºå¥ïŒã§ããããŸãã¯æåå"auto,"ïŒASCII倧æåã»å°æåäžåºå¥ïŒã§å§ãŸããªããã°ãªããªãã
ç»åã®èªã¿èŸŒã¿ãéå§ããimgèŠçŽ ïŒç»åããŒã¿ã®æŽæ°ãŸãã¯ãã®èŠçŽ ã®ç°å¢å€åãžã®å¯Ÿå¿ã¢ã«ãŽãªãºã ãšãšãã«ïŒãèªåãµã€ãºãèš±å¯ãããã€ã¬ã³ããªã³ã°ãããŠããå Žåã autoã¯å®éã®ãªããžã§ã¯ãå¹
ã§ãããããã§ãªããã°ã autoå€ã¯ç¡èŠããã代ããã«æ¬¡ã®source sizeã䜿çšãããïŒååšããå ŽåïŒã
autoããŒã¯ãŒãã¯ãæ¬¡ã®æ¡ä»¶ãæºããããå ŽåãsourceèŠçŽ ã®sizes屿§ããã³imgèŠçŽ ã®sizes屿§ã«æå®ããŠããããããã§ãªããã°ãautoãæå®ããŠã¯ãªããªãã
èŠçŽ ã¯ãåŸç¶ã®å
åŒimg èŠçŽ ããã€sourceã§ããã
èŠçŽ ã¯imgã§ããã
äžèšã®ããããã®æ¡ä»¶ã§åç
§ãããimgèŠçŽ ã¯ã èªåãµã€ãºãå¯èœã«ããã
ããã«ãwidthããã³height屿§ãŸãã¯CSSã§æ¬¡å
ãæå®ããããšã匷ãå§ããããµã€ãºãæå®ãããŠããªãå Žåãç»åã¯300Ã150ã®æ¬¡å
ã§ã¬ã³ããªã³ã°ãããå¯èœæ§ããããããã¯ãsizes="auto" ãcontain-intrinsic-size: 300px 150pxãã¬ã³ããªã³ã°ã»ã¯ã·ã§ã³ã§æé»ã«æå®ããŠããããã§ããã
<source-size-value>ã¯ãç»åã®æå³ããã¬ã€ã¢ãŠãå¹ ãäžãããèè ã¯ã<media-condition>ããã€ç°ãªãç°å¢ã«å¯ŸããŠç°ãªãå¹ ãæå®ããŠãããã
äœã«çžå¯Ÿãããã«ã€ããŠã®æ··ä¹±ãé¿ãããããããŒã»ã³ããŒãžã¯<source-size-value>ã§èš±å¯ãããªãã'vw'åäœã¯ãviewportå¹ ã«çžå¯Ÿçãªå€§ããã«å¯ŸããŠäœ¿çšããããšãã§ããã
An img element has a current request and a pending request. The current request is initially set to a new image request. The pending request is initially set to null.
An image request has a state, current URL, and image data.
An image request's state is one of the following:
An image request's current URL is initially the empty string.
An image request's image data is the decoded image data.
When an image request's state is either partially available or completely available, the image request is said to be available.
When an img element's current request's state is completely available and the user agent can decode the media data without errors, then the img element is said to be fully decodable.
An image request's state is initially unavailable.
When an img element's current request is available, the img element provides a paint source whose width is the image's density-corrected natural width (if any), whose height is the image's density-corrected natural height (if any), and whose appearance is the natural appearance of the image.
An img element is said to use srcset or picture if it has a srcset attribute specified or if it has a parent that is a picture element.
Each img element has a last selected source, which must initially be null.
Each image request has a current pixel density, which must initially be 1.
Each image request has preferred density-corrected dimensions, which is either a struct consisting of a width and a height or is null. It must initially be null.
To determine the density-corrected natural width and height of an img element img:
Let density be img's current request's current pixel density.
Let dimensions be img's current request's preferred density-corrected dimensions.
The preferred density-corrected dimensions are set in the prepare an image for presentation algorithm based on meta information in the image.
If dimensions is not null, then set dimensions's width to dimensions's width divided by density, set dimensions's height to dimensions's height divided by density, and return dimensions.
Let intrinsicWidth, intrinsicHeight, and intrinsicRatio be img's intrinsic width, intrinsic height, and intrinsic aspect ratio, if any, respectively.
If intrinsicWidth is not absent, then set intrinsicWidth to intrinsicWidth divided by density.
If intrinsicHeight is not absent, then set intrinsicHeight to intrinsicHeight divided by density.
Return the result of applying the default sizing algorithm with intrinsicWidth, intrinsicHeight, and intrinsicRatio, using a default object size of 300 by 150.
For example, if the current pixel density is 3.125, that means that there are 300 device pixels per CSS inch, and thus if the image data is 300x600, it has density-corrected natural width and height of 96 CSS pixels by 192 CSS pixels.
All img and link elements are associated with a source set.
A source set is an ordered set of zero or more image sources and a source size.
An image source is a URL, and optionally either a pixel density descriptor, or a width descriptor.
A source size is a <source-size-value>. When a source size has a unit relative to the viewport, it must be interpreted relative to the img element's node document's viewport. Other units must be interpreted the same as in Media Queries. [MQ]
A parse error for algorithms in this section indicates a non-fatal mismatch between input and requirements. User agents are encouraged to expose parse errors somehow.
Whether the image is fetched successfully or not (e.g. whether the response status was an ok status) must be ignored when determining the image's type and whether it is a valid image.
This allows servers to return images with error responses, and have them displayed.
The user agent should apply the image sniffing rules to determine the type of the image, with the image's associated Content-Type headers giving the official type. If these rules are not applied, then the type of the image must be the type given by the image's associated Content-Type headers.
User agents must not support non-image resources with the img element (e.g. XML files whose document element is an HTML element). User agents must not run executable code (e.g. scripts) embedded in the image resource. User agents must only display the first page of a multipage resource (e.g. a PDF file). User agents must not allow the resource to act in an interactive fashion, but should honour any animation in the resource.
This specification does not specify which image types are to be supported.
By default, images are obtained immediately. User agents may provide users with the option to instead obtain them on-demand. (The on-demand option might be used by bandwidth-constrained users, for example.)
When obtaining images immediately, the user agent must synchronously update the image data of the img element, with the restart animation flag set if so stated, whenever that element is created or has experienced relevant mutations.
When obtaining images on demand, the user agent must update the image data of an img element whenever it needs the image data (i.e., on demand), but only if the img element's current request's state is unavailable. When an img element has experienced relevant mutations, if the user agent only obtains images on demand, the img element's current request's state must return to unavailable.
The relevant mutations for an img element are as follows:
The element's src, srcset, width, or sizes attributes are set, changed, or removed.
The element's src attribute is set to the same value as the previous value. This must set the restart animation flag for the update the image data algorithm.
The element's crossorigin attribute's state is changed.
The element's referrerpolicy attribute's state is changed.
The img or source HTML element insertion steps, HTML element removing steps, and HTML element moving steps count the mutation as a relevant mutation.
The element's parent is a picture element and a source element that is a previous sibling has its srcset, sizes, media, type, width or height attributes set, changed, or removed.
The element's adopting steps are run.
If the element allows auto-sizes: the element starts or stops being rendered, or its concrete object size width changes. This must set the maybe omit events flag for the update the image data algorithm.
Each Document object must have a list of available images. Each image in this list is identified by a tuple consisting of an absolute URL, a CORS settings attribute mode, and, if the mode is not No CORS, an origin. Each image furthermore has an ignore higher-layer caching flag. User agents may copy entries from one Document object's list of available images to another at any time (e.g. when the Document is created, user agents can add to it all the images that are loaded in other Documents), but must not change the keys of entries copied in this way when doing so, and must unset the ignore higher-layer caching flag for the copied entry. User agents may also remove images from such lists at any time (e.g. to save memory). User agents must remove entries in the list of available images as appropriate given higher-layer caching semantics for the resource (e.g. the HTTP `Cache-Control` response header) when the ignore higher-layer caching flag is unset.
The list of available images is intended to enable synchronous switching when changing the src attribute to a URL that has previously been loaded, and to avoid re-downloading images in the same document even when they don't allow caching per HTTP. It is not used to avoid re-downloading the same image while the previous image is still loading.
The user agent can also store the image data separately from the list of available images.
For example, if a resource has the HTTP response header `Cache-Control: must-revalidate`, and its ignore higher-layer caching flag is unset, the user agent would remove it from the list of available images but could keep the image data separately, and use that if the server responds with a 304 Not Modified status.
Image data is usually encoded in order to reduce file size. This means that in order for the user agent to present the image to the screen, the data needs to be decoded. Decoding is the process which converts an image's media data into a bitmap form, suitable for presentation to the screen. Note that this process can be slow relative to other processes involved in presenting content. Thus, the user agent can choose when to perform decoding, in order to create the best user experience.
Image decoding is said to be synchronous if it prevents presentation of other content until it is finished. Typically, this has an effect of atomically presenting the image and any other content at the same time. However, this presentation is delayed by the amount of time it takes to perform the decode.
Image decoding is said to be asynchronous if it does not prevent presentation of other content. This has an effect of presenting non-image content faster. However, the image content is missing on screen until the decode finishes. Once the decode is finished, the screen is updated with the image.
In both synchronous and asynchronous decoding modes, the final content is presented to screen after the same amount of time has elapsed. The main difference is whether the user agent presents non-image content ahead of presenting the final content.
In order to aid the user agent in deciding whether to perform synchronous or asynchronous decode, the decoding attribute can be set on img elements. The possible values of the decoding attribute are the following image decoding hint keywords:
| ããŒã¯ãŒã | ç¶æ | 説æ |
|---|---|---|
sync | Sync | Indicates a preference to decode this image synchronously for atomic presentation with other content. |
async | Async | Indicates a preference to decode this image asynchronously to avoid delaying presentation of other content. |
auto | Auto | Indicates no preference in decoding mode (the default). |
When decoding an image, the user agent should respect the preference indicated by the decoding attribute's state. If the state indicated is Auto, then the user agent is free to choose any decoding behavior.
It is also possible to control the decoding behavior using the decode() method. Since the decode() method performs decoding independently from the process responsible for presenting content to screen, it is unaffected by the decoding attribute.
This algorithm cannot be called from steps running in parallel. If a user agent needs to call this algorithm from steps running in parallel, it needs to queue a task to do so.
When the user agent is to update the image data of an img element, optionally with the restart animation flag set, optionally with the maybe omit events flag set, it must run the following steps:
If the element's node document is not fully active:
Continue running this algorithm in parallel.
Wait until the element's node document is fully active.
If another instance of this algorithm for this img element was started after this instance (even if it aborted and is no longer running), then return.
Queue a microtask to continue this algorithm.
If the user agent cannot support images, or its support for images has been disabled, then abort the image request for the current request and the pending request, set the current request's state to unavailable, set the pending request to null, and return.
Let previousURL be the current request's current URL.
Let selected source be null and selected pixel density be undefined.
If the element does not use srcset or picture and it has a src attribute specified whose value is not the empty string, then set selected source to the value of the element's src attribute and set selected pixel density to 1.0.
Set the element's last selected source to selected source.
If selected source is not null:
Let urlString be the result of encoding-parsing-and-serializing a URL given selected source, relative to the element's node document.
If urlString is failure, then abort this inner set of steps.
Let key be a tuple consisting of urlString, the img element's crossorigin attribute's mode, and, if that mode is not No CORS, the node document's origin.
If the list of available images contains an entry for key:
Set the ignore higher-layer caching flag for that entry.
Abort the image request for the current request and the pending request.
Set the pending request to null.
Set the current request to a new image request whose image data is that of the entry and whose state is completely available.
Prepare the current request for presentation given the img element.
Set the current request's current pixel density to selected pixel density.
Queue an element task on the DOM manipulation task source given the img element and the following steps:
If restart animation is set, then restart the animation.
Set the current request's current URL to urlString.
If maybe omit events is not set or previousURL is not equal to urlString, then fire an event named load at the img element.
Abort the update the image data algorithm.
Queue a microtask to perform the rest of this algorithm, allowing the task that invoked this algorithm to continue.
If another instance of this algorithm for this img element was started after this instance (even if it aborted and is no longer running), then return.
Only the last instance takes effect, to avoid multiple requests when, for example, the src, srcset, and crossorigin attributes are all set in succession.
Let selected source and selected pixel density be the URL and pixel density that results from selecting an image source, respectively.
If selected source is null:
Set the current request's state to broken, abort the image request for the current request and the pending request, and set the pending request to null.
Queue an element task on the DOM manipulation task source given the img element and the following steps:
Change the current request's current URL to the empty string.
If all of the following are true:
the element has a src attribute or it uses srcset or picture; and
maybe omit events is not set or previousURL is not the empty string,
then fire an event named error at the img element.
Return.
Let urlString be the result of encoding-parsing-and-serializing a URL given selected source, relative to the element's node document.
If urlString is failure:
Abort the image request for the current request and the pending request.
Set the current request's state to broken.
Set the pending request to null.
Queue an element task on the DOM manipulation task source given the img element and the following steps:
Change the current request's current URL to selected source.
If maybe omit events is not set or previousURL is not equal to selected source, then fire an event named error at the img element.
Return.
If the pending request is not null and urlString is the same as the pending request's current URL, then return.
If urlString is the same as the current request's current URL and the current request's state is partially available:
Abort the image request for the pending request.
If restart animation is set, then queue an element task on the DOM manipulation task source given the img element to restart the animation.
Return.
Abort the image request for the pending request.
Set image request to a new image request whose current URL is urlString.
If the current request's state is unavailable or broken, then set the current request to image request. Otherwise, set the pending request to image request.
Let request be the result of creating a potential-CORS request given urlString, "image", and the current state of the element's crossorigin content attribute.
Set request's client to the element's node document's relevant settings object.
If the element uses srcset or picture, set request's initiator to "imageset".
Set request's referrer policy to the current state of the element's referrerpolicy attribute.
Set request's priority to the current state of the element's fetchpriority attribute.
Let delay load event be true if the img's lazy loading attribute is in the Eager state, or if scripting is disabled for the img, and false otherwise.
If the will lazy load element steps given the img return true:
Set the img's lazy load resumption steps to the rest of this algorithm starting with the step labeled fetch the image.
Start intersection-observing a lazy loading element for the img element.
Return.
Fetch the image: Fetch request. Return from this algorithm, and run the remaining steps as part of the fetch's processResponse for the response response.
The resource obtained in this fashion, if any, is image request's image data. It can be either CORS-same-origin or CORS-cross-origin; this affects the image's interaction with other APIs (e.g., when used on a canvas).
When delay load event is true, fetching the image must delay the load event of the element's node document until the task that is queued by the networking task source once the resource has been fetched (defined below) has been run.
This, unfortunately, can be used to perform a rudimentary port scan of the user's local network (especially in conjunction with scripting, though scripting isn't actually necessary to carry out such an attack). User agents may implement cross-origin access control policies that are stricter than those described above to mitigate this attack, but unfortunately such policies are typically not compatible with existing web content.
As soon as possible, jump to the first applicable entry from the following list:
multipart/x-mixed-replaceThe next task that is queued by the networking task source while the image is being fetched must run the following steps:
If image request is the pending request and at least one body part has been completely decoded, abort the image request for the current request, and upgrade the pending request to the current request.
Otherwise, if image request is the pending request and the user agent is able to determine that image request's image is corrupted in some fatal way such that the image dimensions cannot be obtained, abort the image request for the current request, upgrade the pending request to the current request, and set the current request's state to broken.
Otherwise, if image request is the current request, its state is unavailable, and the user agent is able to determine image request's image's width and height, set the current request's state to partially available.
Otherwise, if image request is the current request, its state is unavailable, and the user agent is able to determine that image request's image is corrupted in some fatal way such that the image dimensions cannot be obtained, set the current request's state to broken.
Each task that is queued by the networking task source while the image is being fetched must update the presentation of the image, but as each new body part comes in, if the user agent is able to determine the image's width and height, it must prepare the img element's current request for presentation given the img element and replace the previous image. Once one body part has been completely decoded, perform the following steps:
Set the img element's current request's state to completely available.
If maybe omit events is not set or previousURL is not equal to urlString, then queue an element task on the DOM manipulation task source given the img element to fire an event named load at the img element.
The next task that is queued by the networking task source while the image is being fetched must run the following steps:
If the user agent is able to determine image request's image's width and height, and image request is the pending request, set image request's state to partially available.
Otherwise, if the user agent is able to determine image request's image's width and height, and image request is the current request, prepare image request for presentation given the img element and set image request's state to partially available.
Otherwise, if the user agent is able to determine that image request's image is corrupted in some fatal way such that the image dimensions cannot be obtained, and image request is the pending request:
Abort the image request for the current request and the pending request.
Set the current request's state to broken.
Fire an event named error at the img element.
Otherwise, if the user agent is able to determine that image request's image is corrupted in some fatal way such that the image dimensions cannot be obtained, and image request is the current request:
Abort the image request for image request.
If maybe omit events is not set or previousURL is not equal to urlString, then fire an event named error at the img element.
That task, and each subsequent task that is queued by the networking task source while the image is being fetched, must, if image request is the current request, update the presentation of the image appropriately (e.g., if the image is a progressive JPEG, each packet can improve the resolution of the image).
Furthermore, the last task that is queued by the networking task source once the resource has been fetched must additionally run these steps:
If image request is the pending request, abort the image request for the current request, upgrade the pending request to the current request, and prepare image request for presentation given the img element.
Set image request to the completely available state.
Add the image to the list of available images using the key key, with the ignore higher-layer caching flag set.
If maybe omit events is not set or previousURL is not equal to urlString, then fire an event named load at the img element.
The image data is not in a supported file format; the user agent must set image request's state to broken, abort the image request for the current request and the pending request, upgrade the pending request to the current request if image request is the pending request, and then, if maybe omit events is not set or previousURL is not equal to urlString, queue an element task on the DOM manipulation task source given the img element to fire an event named error at the img element.
While a user agent is running the above algorithm for an element x, there must be a strong reference from the element's node document to the element x, even if that element is not connected.
To abort the image request for an image request or null image request means to run the following steps:
If image request is null, then return.
Forget image request's image data, if any.
Abort any instance of the fetching algorithm for image request, discarding any pending tasks generated by that algorithm.
To upgrade the pending request to the current request for an img element means to run the following steps:
Set the img element's current request to the pending request.
Set the img element's pending request to null.
To prepare an image for presentation for an image request req given image element img:
Let exifTagMap be the EXIF tags obtained from req's image data, as defined by the relevant codec. [EXIF]
Let physicalWidth and physicalHeight be the width and height obtained from req's image data, as defined by the relevant codec.
Let dimX be the value of exifTagMap's tag 0xA002 (PixelXDimension).
Let dimY be the value of exifTagMap's tag 0xA003 (PixelYDimension).
Let resX be the value of exifTagMap's tag 0x011A (XResolution).
Let resY be the value of exifTagMap's tag 0x011B (YResolution).
Let resUnit be the value of exifTagMap's tag 0x0128 (ResolutionUnit).
If all the following are true:
dimX is a positive integer;
dimY is a positive integer;
resX is a positive floating-point number;
resY is a positive floating-point number;
physicalWidth Ã 72 / resX is dimX;
physicalHeight Ã 72 / resY is dimY;
resUnit is 2 (Inch),
then:
If req's image data is CORS-cross-origin, then set img's natural dimensions to dimX and dimY, and scale img's pixel data accordingly.
Otherwise, set req's preferred density-corrected dimensions to a struct with its width set to dimX and its height set to dimY.
Update req's img element's presentation appropriately.
Resolution in EXIF is equivalent to CSS points per inch, therefore 72 is the base for computing size from resolution.
It is not yet specified what would be the case if EXIF arrives after the image is already presented. See issue #4929.
To select an image source given an img element el:
Update the source set for el.
If el's source set is empty, return null as the URL and undefined as the pixel density.
Return the result of selecting an image from el's source set.
To select an image source from a source set given a source set sourceSet:
If an entry b in sourceSet has the same associated pixel density descriptor as an earlier entry a in sourceSet, then remove entry b. Repeat this step until none of the entries in sourceSet have the same associated pixel density descriptor as an earlier entry.
In an implementation-defined manner, choose one image source from sourceSet. Let selectedSource be this choice.
Return selectedSource and its associated pixel density.
When asked to create a source set given a string default source, a string srcset, a string sizes, and an element or null img:
Let source set be an empty source set.
If srcset is not an empty string, then set source set to the result of parsing srcset.
Set source set's source size to the result of parsing sizes with img.
If default source is not the empty string and source set does not contain an image source with a pixel density descriptor value of 1, and no image source with a width descriptor, append default source to source set.
Normalize the source densities of source set.
Return source set.
When asked to update the source set for a given img or link element el, user agents must do the following:
Set el's source set to an empty source set.
Let elements be « el ».
If el is an img element whose parent node is a picture element, then replace the contents of elements with el's parent node's child elements, retaining relative order.
Let img be el if el is an img element, otherwise null.
For each child in elements:
If child is el:
Let default source be the empty string.
Let srcset be the empty string.
Let sizes be the empty string.
If el is an img element that has a srcset attribute, then set srcset to that attribute's value.
Otherwise, if el is a link element that has an imagesrcset attribute, then set srcset to that attribute's value.
If el is an img element that has a sizes attribute, then set sizes to that attribute's value.
Otherwise, if el is a link element that has an imagesizes attribute, then set sizes to that attribute's value.
If el is an img element that has a src attribute, then set default source to that attribute's value.
Otherwise, if el is a link element that has an href attribute, then set default source to that attribute's value.
Set el's source set to the result of creating a source set given default source, srcset, sizes, and img.
Return.
If el is a link element, then elements contains only el, so this step will be reached immediately and the rest of the algorithm will not run.
If child does not have a srcset attribute, continue to the next child.
Parse child's srcset attribute and let source set be the returned source set.
If source set has zero image sources, continue to the next child.
If child has a media attribute, and its value does not match the environment, continue to the next child.
Parse child's sizes attribute with img, and let source set's source size be the returned value.
If child has a type attribute, and its value is an unknown or unsupported MIME type, continue to the next child.
If child has width or height attributes, set el's dimension attribute source to child. Otherwise, set el's dimension attribute source to el.
Normalize the source densities of source set.
Set el's source set to source set.
Return.
Each img element independently considers its previous sibling source elements plus the img element itself for selecting an image source, ignoring any other (invalid) elements, including other img elements in the same picture element, or source elements that are following siblings of the relevant img element.
When asked to parse a srcset attribute from an element, parse the value of the element's srcset attribute as follows:
Let input be the value passed to this algorithm.
Let position be a pointer into input, initially pointing at the start of the string.
Let candidates be an initially empty source set.
Splitting loop: Collect a sequence of code points that are ASCII whitespace or U+002C COMMA characters from input given position. If any U+002C COMMA characters were collected, that is a parse error.
If position is past the end of input, return candidates.
Collect a sequence of code points that are not ASCII whitespace from input given position, and let url be the result.
Let descriptors be a new empty list.
If url ends with U+002C (,):
Remove all trailing U+002C COMMA characters from url. If this removed more than one character, that is a parse error.
Otherwise:
Descriptor tokenizer: Skip ASCII whitespace within input given position.
Let current descriptor be the empty string.
Let state be in descriptor.
Let c be the character at position. Do the following depending on the value of state. For the purpose of this step, "EOF" is a special character representing that position is past the end of input.
Do the following, depending on the value of c:
If current descriptor is not empty, append current descriptor to descriptors and let current descriptor be the empty string. Set state to after descriptor.
Advance position to the next character in input. If current descriptor is not empty, append current descriptor to descriptors. Jump to the step labeled descriptor parser.
Append c to current descriptor. Set state to in parens.
If current descriptor is not empty, append current descriptor to descriptors. Jump to the step labeled descriptor parser.
Append c to current descriptor.
Do the following, depending on the value of c:
Append c to current descriptor. Set state to in descriptor.
Append current descriptor to descriptors. Jump to the step labeled descriptor parser.
Append c to current descriptor.
Do the following, depending on the value of c:
Stay in this state.
Jump to the step labeled descriptor parser.
Set state to in descriptor. Set position to the previous character in input.
Advance position to the next character in input. Repeat this step.
In order to be compatible with future additions, this algorithm supports multiple descriptors and descriptors with parens.
Descriptor parser: Let error be no.
Let width be absent.
Let density be absent.
Let future-compat-h be absent.
For each descriptor in descriptors, run the appropriate set of steps from the following list:
If the user agent does not support the sizes attribute, let error be yes.
A conforming user agent will support the sizes attribute. However, user agents typically implement and ship features in an incremental manner in practice.
If width and density are not both absent, then let error be yes.
Apply the rules for parsing non-negative integers to the descriptor. If the result is 0, let error be yes. Otherwise, let width be the result.
If width, density and future-compat-h are not all absent, then let error be yes.
Apply the rules for parsing floating-point number values to the descriptor. If the result is less than 0, let error be yes. Otherwise, let density be the result.
If density is 0, the natural dimensions will be infinite. User agents are expected to have limits in how big images can be rendered.
This is a parse error.
If future-compat-h and density are not both absent, then let error be yes.
Apply the rules for parsing non-negative integers to the descriptor. If the result is 0, let error be yes. Otherwise, let future-compat-h be the result.
Let error be yes.
If future-compat-h is not absent and width is absent, let error be yes.
If error is still no, then append a new image source to candidates whose URL is url, associated with a width width if not absent and a pixel density density if not absent. Otherwise, there is a parse error.
Return to the step labeled splitting loop.
When asked to parse a sizes attribute from an element element, with an img element or null img:
Let unparsed sizes list be the result of parsing a comma-separated list of component values from the value of element's sizes attribute (or the empty string, if the attribute is absent). [CSSSYNTAX]
Let size be null.
For each unparsed size in unparsed sizes list:
Remove all consecutive <whitespace-token>s from the end of unparsed size. If unparsed size is now empty, then that is a parse error; continue.
If the last component value in unparsed size is a valid non-negative <source-size-value>, then set size to its value and remove the component value from unparsed size. Any CSS function other than the math functions is invalid. Otherwise, there is a parse error; continue.
If size is auto, and img is not null, and img is being rendered, and img allows auto-sizes, then set size to the concrete object size width of img, in CSS pixels.
If size is still auto, then it will be ignored.
Remove all consecutive <whitespace-token>s from the end of unparsed size. If unparsed size is now empty:
If this was not the last item in unparsed sizes list, that is a parse error.
If size is not auto, then return size. Otherwise, continue.
Parse the remaining component values in unparsed size as a <media-condition>. If it does not parse correctly, or it does parse correctly but the <media-condition> evaluates to false, continue. [MQ]
If size is not auto, then return size. Otherwise, continue.
Return 100vw.
It is invalid to use a bare <source-size-value> that is a <length> (without an accompanying <media-condition>) as an entry in the <source-size-list> that is not the last entry. However, the parsing algorithm allows it at any point in the <source-size-list>, and will accept it immediately as the size if the preceding entries in the list weren't used. This is to enable future extensions, and protect against simple author errors such as a final trailing comma. A bare auto keyword is allowed to have other entries following it to provide a fallback for legacy user agents.
An image source can have a pixel density descriptor, a width descriptor, or no descriptor at all accompanying its URL. Normalizing a source set gives every image source a pixel density descriptor.
When asked to normalize the source densities of a source set source set, the user agent must do the following:
Let source size be source set's source size.
For each image source in source set:
If the image source has a pixel density descriptor, continue to the next image source.
Otherwise, if the image source has a width descriptor, replace the width descriptor with a pixel density descriptor with a value of the width descriptor value divided by source size and a unit of x.
If the source size is 0, then the density would be infinity, which results in the natural dimensions being 0 by 0.
Otherwise, give the image source a pixel density descriptor of 1x.
The user agent may at any time run the following algorithm to update an img element's image in order to react to changes in the environment. (User agents are not required to ever run this algorithm; for example, if the user is not looking at the page any more, the user agent might want to wait until the user has returned to the page before determining which image to use, in case the environment changes again in the meantime.)
User agents are encouraged to run this algorithm in particular when the user changes the viewport's size (e.g. by resizing the window or changing the page zoom), and when an img element is inserted into a document, so that the density-corrected natural width and height match the new viewport, and so that the correct image is chosen when art direction is involved.
Await a stable state. The synchronous section consists of all the remaining steps of this algorithm until the algorithm says the synchronous section has ended. (Steps in synchronous sections are marked with â.)
â If the img element does not use srcset or picture, its node document is not fully active, it has image data whose resource type is multipart/x-mixed-replace, or its pending request is not null, then return.
â Let selected source and selected pixel density be the URL and pixel density that results from selecting an image source, respectively.
â If selected source is null, then return.
â If selected source and selected pixel density are the same as the element's last selected source and current pixel density, then return.
â Let urlString be the result of encoding-parsing-and-serializing a URL given selected source, relative to the element's node document.
â If urlString is failure, then return.
â Let corsAttributeState be the state of the element's crossorigin content attribute.
â Let origin be the img element's node document's origin.
â Let client be the img element's node document's relevant settings object.
â Let key be a tuple consisting of urlString, corsAttributeState, and, if corsAttributeState is not No CORS, origin.
â Let image request be a new image request whose current URL is urlString.
â Set the element's pending request to image request.
End the synchronous section, continuing the remaining steps in parallel.
If the list of available images contains an entry for key, then set image request's image data to that of the entry. Continue to the next step.
Otherwise:
Let request be the result of creating a potential-CORS request given urlString, "image", and corsAttributeState.
Set request's client to client, set request's initiator to "imageset", and set request's synchronous flag.
Set request's referrer policy to the current state of the element's referrerpolicy attribute.
Set request's priority to the current state of the element's fetchpriority attribute.
Let response be the result of fetching request.
If response's unsafe response is a network error or if the image format is unsupported (as determined by applying the image sniffing rules, again as mentioned earlier), or if the user agent is able to determine that image request's image is corrupted in some fatal way such that the image dimensions cannot be obtained, or if the resource type is multipart/x-mixed-replace, then set the pending request to null and abort these steps.
Otherwise, response's unsafe response is image request's image data. It can be either CORS-same-origin or CORS-cross-origin; this affects the image's interaction with other APIs (e.g., when used on a canvas).
Queue an element task on the DOM manipulation task source given the img element and the following steps:
If the img element has experienced relevant mutations since this algorithm started, then set the pending request to null and abort these steps.
Set the img element's last selected source to selected source and the img element's current pixel density to selected pixel density.
Set the image request's state to completely available.
Add the image to the list of available images using the key key, with the ignore higher-layer caching flag set.
Prepare image request for presentation given the img element.
Fire an event named load at the img element.
ç¹ã«æå®ãããŠããå Žåãé€ããalt屿§ãæå®ããªããã°ãªããããã®å€ã¯ç©ºã§ãã£ãŠã¯ãªããªããå€ã¯ç»åã«å¯ŸããŠé©åãªä»£çšåã§ãªããã°ãªããªããalt屿§ã«å¯Ÿããå
·äœçãªèŠä»¶ã¯ã次ã®ç¯ã§èª¬æããããã«ãç»åã衚çŸããããšãããã®ã«ãã£ãŠç°ãªãã
代æ¿ããã¹ããèšè¿°ããå Žåã«èæ
®ãã¹ãæãäžè¬çãªèŠåã¯æ¬¡ã®ãšããã§ããïŒãã¹ãŠã®ç»åããã®ç»åã®alt屿§ã®ããã¹ããšçœ®æããŠãããŒãžã®æå³ãå€ããªãããšãæå³ããã
ãã£ãŠãäžè¬ã«ã代æ¿ããã¹ãã¯ãããç»åãå«ããããšãã§ããªãã£ããªãã°ãäœãæžãããŠããã ããããèæ ®ããããšã§èšè¿°ããããšãã§ããã
ãã®åž°çµã¯ãalt屿§ã®å€ãç»åã®ãã£ãã·ã§ã³ãã¿ã€ãã«ãå¡äŸãšã¿ãªãããšãã§ããããã¹ããå«ããã¹ãã§ã¯ãªããšããããšã§ããããŠãŒã¶ãŒãç»åã®ä»£ããã«äœ¿çšã§ãã代çšããã¹ããå«ãã¯ãã§ãããç»åãè£å®ããããšãæå³ããªããtitle屿§ã¯ãè£è¶³æ
å ±ã®ããã«äœ¿çšããããšãã§ããã
ãã1ã€ã®åž°çµã¯ãalt屿§ã®å€ã¯æ¢ã«ç»å飿¥ããæã§æäŸãããæ
å ±ãç¹°ãè¿ãã¹ãã§ã¯ãªããšããããšã§ããã
代æ¿ããã¹ããèãã1ã€ã®æ¹æ³ã¯ãç»åã®ååšãããããšãèšåããããšãªããé»è©±ã§èª°ãã«ç»åãå«ãããŒãžãã©ã®ããã«èªãããèããããšã§ãããéåžžãç»åã®ä»£ããã«ãããã®ã¯äœã§ãã代æ¿ããã¹ããèšè¿°ããããã®è¯ãã¹ã¿ãŒãã§ããã
ãã€ããŒãªã³ã¯ãäœæããaèŠçŽ ããŸãã¯buttonèŠçŽ ããããã¹ãã³ã³ãã³ããæããªãã1ã€ä»¥äžã®ç»åãå«ãå Žåãalt屿§ã¯ãªã³ã¯ãŸãã¯ãã¿ã³ã®ç®çã䜵ããŠäŒããããã¹ããå«ãŸãªããã°ãªããªãã
ãã®äŸã§ã¯ããŠãŒã¶ãŒã¯ã3ã€ã®ãªã¹ããã奜ã¿ã®è²ãéžæããããæ±ããããŠãããåè²ã¯ç»åã§äžããããããç»åã衚瀺ããªãããã«ãŠãŒã¶ãŒãšãŒãžã§ã³ããèšå®ããŠãããŠãŒã¶ãŒã®ããã«ãè²åã代ããã«äœ¿çšãããïŒ
< h1 > Pick your color</ h1 >
< ul >
< li >< a href = "green.html" > < img src = "green.jpeg" alt = "Green" > </ a ></ li >
< li >< a href = "blue.html" > < img src = "blue.jpeg" alt = "Blue" > </ a ></ li >
< li >< a href = "red.html" > < img src = "red.jpeg" alt = "Red" > </ a ></ li >
</ ul >
ãã®äŸã«ãããŠãããããã®ãã¿ã³ã¯ããŠãŒã¶ãŒãæãè²ã®åºåã®çš®é¡ã瀺ãããã«ãç»åã®éåãæã€ãæåã®ç»åã¯ã代æ¿ããã¹ããæäŸããããã«äœ¿çšãããã
< button name = "rgb" > < img src = "red" alt = "RGB" >< img src = "green" alt = "" >< img src = "blue" alt = "" > </ button >
< button name = "cmyk" > < img src = "cyan" alt = "CMYK" >< img src = "magenta" alt = "" >< img src = "yellow" alt = "" >< img src = "black" alt = "" > </ button >
åç»åã¯ããã¹ãã®äžéšã衚ãããããã®ããã«ãæžãããšãã§ããïŒ
< button name = "rgb" > < img src = "red" alt = "R" >< img src = "green" alt = "G" >< img src = "blue" alt = "B" > </ button >
< button name = "cmyk" > < img src = "cyan" alt = "C" >< img src = "magenta" alt = "M" >< img src = "yellow" alt = "Y" >< img src = "black" alt = "K" > </ button >
ããããä»ã®ä»£æ¿ããã¹ããšãšãã«ãããã¯åäœããªãããããããããããã®å Žåã«1ã€ã®ç»åã«ãã¹ãŠã®ä»£æ¿ããã¹ããå ¥ããæ¹ãçã«ããªã£ãŠãããããããªãïŒ
< button name = "rgb" > < img src = "red" alt = "sRGB profile" >< img src = "green" alt = "" >< img src = "blue" alt = "" > </ button >
< button name = "cmyk" > < img src = "cyan" alt = "CMYK profile" >< img src = "magenta" alt = "" >< img src = "yellow" alt = "" >< img src = "black" alt = "" > </ button >
ããšãã°ãããŒãã£ãŒããå³ãã°ã©ãããŸãã¯éé ã瀺ãç°¡åãªå°å³ãªã©ãæå³ããç©ãèŠèŠçãªåœ¢åŒã§æã«ããæç¢ºã«èšè¿°ããããšãã§ããããã®ãããªå Žåãç»åã¯imgèŠçŽ ã䜿ã£ãŠæå®ããããšãã§ããããããå°ãªãããã¹ãçãäŸç¶ãšããŠäžããããªããã°ãªããããã®ããç»åã衚瀺ã§ããªãïŒããšãã°ãéåžžã«äœéãªæ¥ç¶ã§ããããŸãã¯ããã¹ãã®ã¿ã®ãã©ãŠã¶ãŒã䜿çšããŠããããŸãã¯ãã³ãºããªãŒã®èªåè»çšé³å£°ãŠã§ããã©ãŠã¶ãŒã«ãã£ãŠèªã¿åºãããŠããããŒãžãèããŠããããŸãã¯åã«ç®ãèŠããªãããïŒãŠãŒã¶ãŒã¯äŸç¶ãšããŠã¡ãã»ãŒãžãæ¬éãããŠçè§£ã§ããã
ããã¹ãã¯alt屿§ã§æå®ãããªããã°ãªããããã€src屿§ã§æå®ãããç»åãšåãã¡ãã»ãŒãžãäŒããªããã°ãªããªãã
代æ¿ããã¹ããç»åã®èª¬æã§ãªããç»åã®ä»£çšåã§ããããšãèªèããããšãéèŠã§ããã
次ã®äŸã«ãããŠãæåœ¢åŒã®ãããŒãã£ãŒããèšãæããalt屿§ã®ããã¹ãããšããªããç»å圢åŒã®ãããŒãã£ãŒããæã€ïŒ
< p > In the common case, the data handled by the tokenization stage
comes from the network, but it can also come from script.</ p >
< p > < img src = "images/parsing-model-overview.svg" alt = "The Network
passes data to the Input Stream Preprocessor, which passes it to the
Tokenizer, which passes it to the Tree Construction stage. From there,
data goes to both the DOM and to Script Execution. Script Execution is
linked to the DOM, and, using document.write(), passes data to the
Tokenizer." > </ p >
ããã¯å¥ã®äŸã§ããã説æã«ç»åãå«ããåé¡ã«è¯ã解決çãšæªã解決çã瀺ããã®ã§ããã
ãŸããããã¯è¯ã解決çã§ããããã®ãµã³ãã«ã¯ãç»åãååšããªãã£ãå Žåã代æ¿ããã¹ããã¡ããã©æã«å ¥ããã§ããããã®ãã©ãããã¹ããã瀺ãã
<!-- This is the correct way to do things. -->
< p >
You are standing in an open field west of a house.
< img src = "house.jpeg" alt = "The house is white, with a boarded front door." >
There is a small mailbox here.
</ p >
ã€ãã«ãããã¯æªã解決çã§ããããã®ééã£ãæ¹æ³ã§ã¯ãç»åã«å¯Ÿããããã¹ã眮æã®ä»£ããã«ã代æ¿ããã¹ãã¯ç»åã®ç°¡åãªèª¬æã§ãããç»åã衚瀺ãããŠããªãå Žåãããã¹ãã¯æåã®äŸãšåæ§ã«æµããªãã
<!-- This is the wrong way to do things. -->
< p >
You are standing in an open field west of a house.
< img src = "house.jpeg" alt = "A white house, with a boarded front door." >
There is a small mailbox here.
</ p >
ïŒtitle屿§ã«å¯ŸããŠããŸãã¯ããã®ç»åããã€figureã®figcaptionèŠçŽ å
ã§é©åœãããããªããïŒ"Photo of white house with boarded door"ãªã©ã®ããã¹ãã¯åæ§ã«æªã代æ¿ããã¹ããšãªãã
ææžã¯ãã¢ã€ã³ã³åœ¢åŒã§æ å ±ãå«ãããšãã§ãããã¢ã€ã³ã³ã¯ãèŠèŠãã©ãŠã¶ãŒã®ãŠãŒã¶ãŒã«äžç®ã§æ©èœãèªèããã®ãå©ããããšãæå³ããã
ããå Žåãã¢ã€ã³ã³ã¯åãæå³ãäŒããããã¹ãã©ãã«ãè£è¶³ããããããã®å Žåã«ãããŠãalt屿§ã¯ååšããªããã°ãªããªããã空ã§ãªããã°ãªããªãã
ããã§ãã¢ã€ã³ã³ã¯åãæå³ãäŒããããã¹ãã®é£ã«ããã®ã§ã空ã®alt屿§ãæã€ïŒ
< nav >
< p >< a href = "/help/" > < img src = "/icons/help.png" alt = "" > Help</ a ></ p >
< p >< a href = "/configure/" > < img src = "/icons/configuration.png" alt = "" >
Configuration Tools</ a ></ p >
</ nav >
ä»ã®å Žåã«ãããŠãã¢ã€ã³ã³ã¯äœããæå³ããèšè¿°ããã€æšªã®ããã¹ããæããªããã¢ã€ã³ã³ã¯èªæã§ãããšä»®å®ãããããã®å Žåã«ãããŠãåçã®ããã¹ãã©ãã«ã¯alt屿§ã§æå®ããªããã°ãªããªãã
ããã§ããã¥ãŒã¹ãµã€ãã®èšäºã¯ããã®ãããã¯ã瀺ãã¢ã€ã³ã³ã衚瀺ãããã
< body >
< article >
< header >
< h1 > Ratatouille wins < i > Best Movie of the Year</ i > award</ h1 >
< p > < img src = "movies.png" alt = "Movies" > </ p >
</ header >
< p > Pixar has won yet another < i > Best Movie of the Year</ i > award,
making this its 8th win in the last 12 years.</ p >
</ article >
< article >
< header >
< h1 > Latest TWiT episode is online</ h1 >
< p > < img src = "podcasts.png" alt = "Podcasts" > </ p >
</ header >
< p > The latest TWiT episode has been posted, in which we hear
several tech news stories as well as learning much more about the
iPhone. This week, the panelists compare how reflective their
iPhones' Apple logos are.</ p >
</ article >
</ body >
å€ãã®ããŒãžã¯ãäŒç€Ÿãçµç¹ããããžã§ã¯ãããã³ãããœãããŠã§ã¢ããã±ãŒãžãåœããŸãã¯ãã®ä»å£äœã衚ãããŽãèšå·ãæããŸãã¯ãšã³ãã¬ã ãå«ãã
ããšãã°ããŒãžã®èŠåºãã®ããã«ãããŽãå£äœã衚ãããã«äœ¿çšãããŠããå Žåãalt屿§ã¯ããŽã«ãã£ãŠè¡šããããã®å£äœã®ååãå«ãŸãªããã°ãªããªããalt屿§ã¯ãäŒããããŠããããŽã§ãããšããäºå®ã¯ãªãã®ã§ãåèª"ããŽ"ã®ãããªããã¹ããå«ãã§ã¯ãªããªããå£äœãã®ãã®ã§ããã
ããŽã衚ããã®ã®ååã®æšªã«ããŽã䜿çšãããå Žåããã®ããŽã¯è£è¶³ã§ããããã®alt屿§ã¯ç©ºã§ãªããã°ãªããªãã
ããŽãåãªãè£ é£ŸææïŒãã©ã³ãã£ã³ã°ãšããŠãããšãã°ãããŽãæå±ããå®äœãèšåããèšäºã§ãµã€ãã€ã¡ãŒãžïŒãšããŠäœ¿çšãããå ŽåãçŽç²ã«è£ 食çãªç»åã§äžèšã®ãšã³ããªãŒãé©çšããããããŽãå®éã«è°è«ãããŠããå Žåãããã¯ä»£æ¿ã°ã©ãã£ãã¯è¡šçŸïŒããŽèªäœïŒãããã³é©çšãããäžèšã®æåã®ãšã³ããªãŒãæã€èªå¥ã段èœïŒããŽã®èª¬æïŒãšããŠäœ¿çšãããŠããã
æ¬¡ã®æçã«ãããŠãäžèšã®äŸã®ãã¹ãŠã®4ã€ãååšããŠããããŸããäŒç€Ÿã衚ãããã«äœ¿çšãããããŽãèŠãŠã¿ãïŒ
< h1 > < img src = "XYZ.gif" alt = "The XYZ company" > </ h1 >
次ã«ãäŒç€Ÿåã®é£ã§ããŽã䜿çšããæ®µèœãèŠãŠã¿ãããäœã代æ¿ããã¹ããæããªãïŒ
< article >
< h2 > News</ h2 >
< p > We have recently been looking at buying the < img src = "alpha.gif"
alt = "" > ÎÎÎ company, a small Greek company
specializing in our type of product.</ p >
ãã®3çªç®ã®æçã«ãããŠã賌買ãåå³ããarticleã®äžéšãšããŠãasideã«äœ¿çšãããŠããããŽãæã€ïŒ
< aside >< p >< img src = "alpha-large.gif" alt = "" ></ p ></ aside >
< p > The ÎÎÎ company has had a good quarter, and our
pie chart studies of their accounts suggest a much bigger blue slice
than its green and orange slices, which is always a good sign.</ p >
</ article >
æåŸã«ãããŽã話é¡ã«ããæèŠèšäºã§ãããããŽã¯ä»£æ¿ããã¹ãã§è©³çްã«èšèŒãããã
< p > Consider for a moment their logo:</ p >
< p >< img src = "/images/logo" alt = "It consists of a green circle with a
green question mark centered inside it." ></ p >
< p > How unoriginal can you get? I mean, oooooh, a question mark, how
< em > revolutionary</ em > , how utterly < em > ground-breaking</ em > , I'm
sure everyone will rush to adopt those specifications now! They could
at least have tried for some sort of, I don't know, sequence of
rounded squares with varying shades of green and bold white outlines,
at least that would look good on the cover of a blue book.</ p >
ãã®äŸã¯ãç»åãå©çšå¯èœã§ãªãå Žåãã©ã®ããã«ä»£æ¿ããã¹ãã¯èšè¿°ãã¹ããã瀺ãã代ããã«ããã¹ãã䜿çšãããããããç»åãæåã®å Žæã«ãªãã£ããã®ããã«ãããã¹ãã¯åšå²ã®ããã¹ãã«ã·ãŒã ã¬ã¹ã«æµããã
æã«ãç»åãããã¹ãã ãã§æ§æãããŠãããç»åã®ç®çããããã¹ããã¬ã³ããªã³ã°ããããã«äœ¿çšãããå®éã®å°å·å¹æã匷調ããã ãã§ãªããåã«ããã¹ãèªäœãäŒãããã®ã
ãã®ãããªå Žåãalt屿§ãååšããªããã°ãªããªãããç»åèªèº«ã«æžããããã®ãšåãããã¹ãã§æ§æãããªããã°ãªããªãã
ããã¹ã"Earth Day"ãå«ãã°ã©ãã£ãã¯ãèæ ®ããããæåã¯ãã¹ãŠã®è±ãæ€ç©ã§é£Ÿããããã°ã©ãã£ã«ã«ãªãŠãŒã¶ãŒã«å¯ŸããŠããŒãžã«å³ãããå ããããã«ãããã¹ããåã«èŠåºããšããŠäœ¿çšãããå Žåãé©åãªä»£æ¿ããã¹ãã¯ãŸãã«åãããã¹ã"Earth Day"ã§ãããè£ é£Ÿçãªèšåã¯äœãå¿ èŠãªãïŒ
< h1 > < img src = "earthdayheading.png" alt = "Earth Day" > </ h1 >
圩è²åæ¬ã¯ããã®ç»åã®äžéšã®ã°ã©ãã£ãã¯ã¹ã䜿çšãããããããªãããã®ãããªç¶æ³ã§ä»£æ¿ããã¹ãã¯ãåã«ç»åã衚ãæåã§ããã
< p >< img src = "initials/o.svg" alt = "O" > nce upon a time and a long long time ago, late at
night, when it was dark, over the hills, through the woods, across a great ocean, in a land far
away, in a small house, on a hill, under a full moon...
ç»åãUnicodeã§è¡šçŸã§ããªãæåã衚ãããã«å¥ã®æ¹æ³ã§äœ¿çšãããå Žåãããšãã°å€åãç°äœåããŸãã¯æ°èŠã®é貚èšå·ã®ãããªæ°ããæåã«ãããŠãããã¹ãã«ãã代æ¿ã¯ãããšãã°ãæåã®çºé³ãäžããããã«è¡šé³ã®ã²ãããªãã«ã¿ã«ãã䜿çšãããªã©ãåããã®ãèšè¿°ããããäŒçµ±çãªæ¹æ³ã§ããã¹ãã§ããã
1997幎ããã®ãã®äŸã«ãããŠãäžå€®ã®2ã€ã®ããŒãšãšãã«æžŠå·»ãç¶ã®Eã®ããã«èŠããææ°åŒã®é貚èšå·ã®ãããã«ãç»åã䜿çšããŠè¡šçŸãããã代æ¿ããã¹ãã¯ãæåã®çºé³ãäžããã
< p > Only < img src = "euro.png" alt = "euro " > 5.99!
æåãåãç®çãæãããªãã°ç»åã䜿çšãã¹ãã§ãªããããšãã°è£ 食ã®ããããŸãã¯é©åãªæåããªãããïŒå€åã®å Žåã®ããã«ïŒãªã©ãããã¹ããããã¹ãã§çŽæ¥è¡šçŸããããšãã§ããªãå Žåã«ã®ã¿ãç»åãé©åã ããã
ããã©ã«ãã®ã·ã¹ãã ãã©ã³ããæå®ãããæåããµããŒãããªããããèè ãç»åã䜿çšããããã«èªæãããå ŽåããŠã§ããã©ã³ãã¯ç»åãããåªãã解決çã§ããã
å€ãã®å Žåãç»åã¯å®éã«ã¯åãªãè£è¶³ã§ããããã®ååšã¯åã«åšå²ã®ããã¹ãã匷調ããã ãã§ããããã®å Žåãalt屿§ãååšããªããã°ãªããªããããã®å€ã¯ç©ºæååã§ãªããã°ãªããªãã
äžè¬ã«ç»åã¯ãç»åãåé€ããŠãããŒãžã®æçšæ§ã匱ãŸãããã§ãªãå Žåã«ãã®ã«ããŽãªãŒã«åé¡ãããããç»åãå«ããããšã¯ãèŠèŠãã©ãŠã¶ãŒã®ãŠãŒã¶ãŒã«ãšã£ãŠæŠå¿µãçè§£ããããšãã¯ããã«å®¹æã«ãªãã
ã°ã©ãã£ã«ã«ãªåœ¢åŒã§ãåã®æ®µèœãç¹°ãè¿ããããŒãã£ãŒãïŒ
< p > The Network passes data to the Input Stream Preprocessor, which
passes it to the Tokenizer, which passes it to the Tree Construction
stage. From there, data goes to both the DOM and to Script Execution.
Script Execution is linked to the DOM, and, using document.write(),
passes data to the Tokenizer.</ p >
< p >< img src = "images/parsing-model-overview.svg" alt = "" ></ p >
ãã®å Žåãåãªããã£ãã·ã§ã³ã§æ§æãã代æ¿ããã¹ããå«ããããšãééã£ãŠããã ããããã£ãã·ã§ã³ãå«ãŸããã¹ãå Žåãtitle屿§ããŸãã¯ãfigureããã³figcaptionèŠçŽ ã®ããããã䜿çšã§ãããåŸè
ã®å Žåãç»åã¯å®éã«ä»£æ¿ã°ã©ãã£ãã¯è¡šçŸã䌎ããã¬ãŒãºãŸãã¯æ®µèœãããããããããã£ãŠä»£æ¿ããã¹ããå¿
èŠãšããã
<!-- Using the title="" attribute -->
< p > The Network passes data to the Input Stream Preprocessor, which
passes it to the Tokenizer, which passes it to the Tree Construction
stage. From there, data goes to both the DOM and to Script Execution.
Script Execution is linked to the DOM, and, using document.write(),
passes data to the Tokenizer.</ p >
< p > < img src = "images/parsing-model-overview.svg" alt = ""
title = "Flowchart representation of the parsing model." > </ p >
<!-- Using <figure> and <figcaption> -->
< p > The Network passes data to the Input Stream Preprocessor, which
passes it to the Tokenizer, which passes it to the Tree Construction
stage. From there, data goes to both the DOM and to Script Execution.
Script Execution is linked to the DOM, and, using document.write(),
passes data to the Tokenizer.</ p >
< figure >
< img src = "images/parsing-model-overview.svg" alt = "The Network leads to
the Input Stream Preprocessor, which leads to the Tokenizer, which
leads to the Tree Construction stage. The Tree Construction stage
leads to two items. The first is Script Execution, which leads via
document.write() back to the Tokenizer. The second item from which
Tree Construction leads is the DOM. The DOM is related to the Script
Execution." >
< figcaption > Flowchart representation of the parsing model.</ figcaption >
</ figure >
<!-- This is WRONG. Do not do this. Instead, do what the above examples do. -->
< p > The Network passes data to the Input Stream Preprocessor, which
passes it to the Tokenizer, which passes it to the Tree Construction
stage. From there, data goes to both the DOM and to Script Execution.
Script Execution is linked to the DOM, and, using document.write(),
passes data to the Tokenizer.</ p >
< p >< img src = "images/parsing-model-overview.svg"
alt = "Flowchart representation of the parsing model." ></ p >
<!-- Never put the image's caption in the alt="" attribute! -->
ã°ã©ãã£ã«ã«ãªåœ¢åŒã§ãåã®æ®µèœãç¹°ãè¿ãã°ã©ãïŒ
< p > According to a study covering several billion pages,
about 62% of documents on the web in 2007 triggered the Quirks
rendering mode of web browsers, about 30% triggered the Almost
Standards mode, and about 9% triggered the Standards mode.</ p >
< p >< img src = "rendering-mode-pie-chart.png" alt = "" ></ p >
æã«ã¯ãç»åã¯ã³ã³ãã³ãã«éèŠã§ã¯ãªãããããã«ãããããããçŽç²ã«è£
食çã§ãããã¹ããšå®å
šã«åé·ã§ããªãããšãããããã®å Žåãalt屿§ã¯ååšããªããã°ãªããããã€ãã®å€ã¯ç©ºã®æååããŸãã¯ç»åãäŒããæ
å ±ã®ããã¹ã衚çŸã®ããããã§ããã¹ãã§ãããç»åãç»åã®ã¿ã€ãã«ãäžãããã£ãã·ã§ã³ãæã€å ŽåãïŒéèŠèŠèªè
ã«çžåœãªæ··ä¹±ãäžããããšã«ãªãã®ã§ïŒalt屿§ã®å€ã¯ç©ºã§ãã£ãŠã¯ãªããªãã
å人ã®é¡ãç»åã§ç€ºãããŠããæ¿æ²»å®¶ã«é¢ãããã¥ãŒã¹èšäºãèããŠã¿ãããã¥ãŒã¹èšäºã«é¢é£ããã®ã§ãç»åã¯çŽç²ã«è£ 食çã§ã¯ãªããæ¿æ²»å®¶ãã©ã®ããã«èŠãããã瀺ãã®ã§ãç»åã¯ããããã®ãã¥ãŒã¹èšäºãšãå®å šã«åé·ã§ã¯ãªãã代æ¿ããã¹ããæäŸããå¿ èŠããããã©ããã¯ãç»åãæ¬æã®è§£éã«åœ±é¿ãäžãããã©ããã«ãã£ãŠæ±ºå®ããããªãŒãµãªã³ã°ã®æ±ºå®ã§ããã
ãã®æåã®å€åœ¢äŸã«ãããŠãç»åã¯ã³ã³ããã¹ããªãã§ç€ºããããã€äžåã®ä»£æ¿ããã¹ããæäŸãããªãïŒ
< p > < img src = "president.jpeg" alt = "" > Ahead of today's referendum,
the President wrote an open letter to all registered voters. In it, she admitted that the country was
divided.</ p >
ç»åãé¡ã®ã¿ã§ããå Žåããã®ç»åã説æããéã«å€ã¯ååšããªããããããªããå人ã赀髪ãŸãã¯é髪ãæã€ãã©ãããå人ãçœãèãŸãã¯é»ãèãæã€ãã©ãããå人ãçç®ãŸãã¯äž¡ç®ãæã€ãã©ãããèªè ã«èå³ã®ãªãããšã§ããã
ããããç»åãããåçã§ãããããšãã°æããéåžžã«å¹žãããŸãã¯ã²ã©ãèœã¡èŸŒãã ãªã©ã®æ¿æ²»å®¶ã瀺ãå Žåãäžéšã®ä»£æ¿ããã¹ãã¯ãæç« ã®ããŒã³ãèšå®ããéã«æçšã§ãããããã§ãªããã°èŠéããããããããªãïŒ
< p > < img src = "president.jpeg" alt = "The President is sad." >
Ahead of today's referendum, the President wrote an open letter to all
registered voters. In it, she admitted that the country was divided.
</ p >
< p > < img src = "president.jpeg" alt = "The President is happy!" >
Ahead of today's referendum, the President wrote an open letter to all
registered voters. In it, she admitted that the country was divided.
</ p >
å人ã"æ²ãã"ã"幞ã"ãã¯ã段èœã®æ®ãã®éšåã®è§£éã«éããããããã圌女ã¯ãåœãåå²ãããŠããããšã«äžæºãæã£ãŠãããšèšã£ãŠããã®ãããããšãåœã¯åå²ãããå¯èœæ§ããããšããèŠéãã¯ åœŒå¥³ã®æ¿æ²»çãã£ãªã¢ã«ãšã£ãŠé©ããŠãããšèšã£ãŠããã®ãïŒ è§£éã¯ãç»åã«åºã¥ããŠå€åããã
ç»åããã£ãã·ã§ã³ãæã€å Žåã代æ¿ããã¹ããå«ãããšã¯ãã£ãã·ã§ã³ãäœãåç §ãããã«ã€ããŠã®æ··ä¹±ãéããžã¥ã¢ã«ãŠãŒã¶ãŒã«æ®ãããšãé¿ããã
< p > Ahead of today's referendum, the President wrote an open letter to
all registered voters. In it, she admitted that the country was divided.</ p >
< figure >
< img src = "president.jpeg"
alt = "A high forehead, cheerful disposition, and dark hair round out the President's face." >
< figcaption > The President of Ruritania. Photo © 2014 PolitiPhoto. </ figcaption >
</ figure >
ç»åãè£ é£Ÿçã§ãããç¹ã«ããŒãžåºæã§ãªãå Žåâããšãã°ãµã€ãå šäœã®ãã¶ã€ã³ã¹ããŒã ã®äžéšã圢æããç»åã®ãããªâç»åã¯ãææžã®ããŒã¯ã¢ããã§ãªãããµã€ãã®CSSã§æå®ãã¹ãã§ããã
ããããåšå²ã®ããã¹ãã§è°è«ãããªãããäŸç¶ãšããŠäžéšã®é¢é£æ§ãæã€è£
食çãªç»åã¯imgèŠçŽ ã䜿çšããŠãããŒãžã«å«ããããšãå¯èœã§ããããã®ãããªç»åã¯è£
食çã§ããããäŸç¶ãšããŠã³ã³ãã³ãã®äžéšã«ç±æ¥ããããã®å Žåãalt屿§ãååšããªããã°ãªããªããããã®å€ã¯ç©ºæååã§ãªããã°ãªããªãã
è©©ãæå±ããããŒãžã§ãBurning Manã®ã€ãã³ãããŸãã¯è©©ã«ã€ã³ã¹ãã€ã¢ãããçµµç»ã®ç»åã«ã€ããŠã®ããã°æçš¿ã§Black Rock Cityã®é¢šæ¯ã®åçã®ãããªãã®ãå«ããã®ãé¢é£ããã«ãé¢ããããç»åãçŽç²ã«è£ 食çã§ããäŸãæ¬¡ã®æçã¯ãïŒæåã®è©©ã®è¡ã®ã¿ããã®æçã«å«ãŸããïŒåŸè ã®å Žåã®äŸã瀺ãïŒ
< h1 > The Lady of Shalott</ h1 >
< p >< img src = "shalott.jpeg" alt = "" ></ p >
< p > On either side the river lie< br >
Long fields of barley and of rye,< br >
That clothe the wold and meet the sky;< br >
And through the field the road run by< br >
To many-tower'd Camelot;< br >
And up and down the people go,< br >
Gazing where the lilies blow< br >
Round an island there below,< br >
The island of Shalott.</ p >
ç»åãå°ããªç»åãã¡ã€ã«ã«åå²ãããŠããå Žåãå床å®å
šãªç»åã圢æããããã«å
±ã«è¡šç€ºãããç»åã®1ã€ã¯ãå
šäœãšããŠã®çµµã«é©ããã ããé¢é£èŠåã«åŸã£ãŠèšå®ãããalt屿§ãæããªããã°ãªãããæ®ãã®ãã¹ãŠã®ç»åã¯ã空ã®alt屿§ãæããªããã°ãªããªãã
次ã®äŸã«ãããŠãXYZ瀟ã®äŒç€Ÿã®ããŽã衚ãçµµã2æã«åå²ãããŠããã1æç®ã¯æå"XYZ"ãå«ã¿ã2æç®ã¯åèª"Corp"ããã€ã代æ¿ããã¹ãïŒ "XYZ Corp"ïŒã¯ãæåã®ç»åã§ãã¹ãŠã§ããã
< h1 > < img src = "logo1.png" alt = "XYZ Corp" >< img src = "logo2.png" alt = "" > </ h1 >
次ã®äŸã«ãããŠãè©äŸ¡ã¯ã3ã€ã®å¡ãã€ã¶ãããæãšã2ã€ã®äžæãã®æãšããŠç€ºãããã代æ¿ããã¹ãã¯"â â â ââ"ãããããªããã代ããã«èè ã¯ããã芪åãªåœ¢åŒ"3 out of 5"ã®è©äŸ¡ãäžããããã«ãããããã¯æåã®ç»åã®ä»£æ¿ããã¹ãã§ãããæ®ãã¯ç©ºçœã®ä»£æ¿ããã¹ããæã€ã
< p > Rating: < meter max = 5 value = 3 > < img src = "1" alt = "3 out of 5"
>< img src = "1" alt = "" >< img src = "1" alt = "" >< img src = "0" alt = ""
>< img src = "0" alt = "" > </ meter ></ p >
äžè¬ã«ã€ã¡ãŒãžãããã¯ããªã³ã¯çšã®ç»åãã¹ã©ã€ã¹ãã代ããã«äœ¿çšãããã¹ãã§ããã
ç»åã確ãã«ã¹ã©ã€ã¹ãããã¹ã©ã€ã¹ãããç»åã®ã³ã³ããŒãã³ãã®ããããããªã³ã¯ã®å¯äžã®ã³ã³ãã³ãã§ããå Žåããªã³ã¯ãããã®1ã€ã®ç»åã¯ããªã³ã¯ã®ç®çã衚ãalt屿§ã§ä»£æ¿ããã¹ããæããªããã°ãªããªãã
次ã®äŸã«ãããŠããŠãŒã¶ãŒãåéºäžã®å·ŠåŽãŸãã¯å³åŽãéžã¶ããšãã§ããããã«ãç°ãªãç»åã§å·Šä»å±ãšå³ä»å±ã®ãããããšãé£è¡ã¹ãã²ããã£ã¢ã³ã¹ã¿ãŒãšã³ãã¬ã ã衚ãçµµã§ããã
< h1 > The Church</ h1 >
< p > You come across a flying spaghetti monster. Which side of His
Noodliness do you wish to reach out for?</ p >
< p >< a href = "?go=left" >< img src = "fsm-left.png" alt = "Left side. " ></ a
>< img src = "fsm-middle.png" alt = ""
>< a href = "?go=right" >< img src = "fsm-right.png" alt = "Right side." ></ a ></ p >
å Žåã«ãã£ãŠã¯ãç»åã¯ã³ã³ãã³ãã®éèŠãªéšåã§ãããããšãã°ãããã¯ããã©ãã®ã£ã©ãªãŒã®äžéšã§ããããŒãžã«åœãŠã¯ãŸããããããªããç»åã¯ãã®ç»åãå«ãããŒãžã®å šäœã®èŠç¹ã§ããã
ã³ã³ãã³ãã®éèŠãªéšåã§ããç»åã®ä»£æ¿ããã¹ããæäŸããæ¹æ³ã¯ãç»åã®åºæã«äŸåããã
æäŸããã詳现ãªä»£æ¿ããã¹ãã§å¯èœãªå Žåãããšãã°ãç»åãéèªã®ã¬ãã¥ãŒã§ã®äžé£ã®ã¹ã¯ãªãŒã³ã·ã§ããããæŒ«ç»ã®äžéšããŸãã¯ãã®åçã«é¢ããããã°ãšã³ããªãŒã§ã®åçã§ããå Žåãç»åã«å¯ŸããŠé©åã«æäŸããããããªããã¹ããalt屿§ã®ã³ã³ãã³ããšããŠæå®ãããªããã°ãªããªãã
代æ¿ããã¹ãã䌎ããæ°ããOSã«ã€ããŠã®ã®ã£ã©ãªãŒã§ã®ã¹ã¯ãªãŒã³ã·ã§ããïŒ
< figure >
< img src = "KDE%20Light%20desktop.png"
alt = "The desktop is blue, with icons along the left hand side in
two columns, reading System, Home, K-Mail, etc. A window is
open showing that menus wrap to a second line if they
cannot fit in the window. The window has a list of icons
along the top, with an address bar below it, a list of
icons for tabs along the left edge, a status bar on the
bottom, and two panes in the middle. The desktop has a bar
at the bottom of the screen with a few buttons, a pager, a
list of open applications, and a clock." >
< figcaption > Screenshot of a KDE desktop.</ figcaption >
</ figure >
財åã¬ããŒãã®ã°ã©ãïŒ
< img src = "sales.gif"
title = "Sales graph"
alt = "From 1998 to 2005, sales increased by the following percentages
with each year: 624%, 75%, 138%, 40%, 35%, 9%, 21%" >
"sales graph"ã¯ã売ãäžãã°ã©ãã«å¯Ÿãã代æ¿ããã¹ããšããŠäžååã§ããããšã«æ³šæãããè¯ããã£ãã·ã§ã³ãšãããããã¹ãã¯ãäžè¬ã«çœ®æããã¹ããšããŠã¯é©ããªãã
ããå Žåã«ãããŠãç»åã®æ§è³ªã¯ã培åºãã代æ¿ããã¹ããæäŸããããšãçŸå®çã§ã¯ãªããããããªããããšãã°ãç»åã¯äžé®®æã§ãã£ãããè€éãªãã©ã¯ã¿ã«ãããããã詳现ãªå°åœ¢å³ã§ãããããããªãã
ãã®å Žåãalt屿§ã¯ãé©åãªä»£æ¿ããã¹ããå«ãŸããªããã°ãªããªãããããã¯ããçããããããªãã
åã«ç»åãæ£ããæ±ãããšã®ã§ããããã¹ããååšããªãã®ã§ãããããšãã°ãããŒã«ã·ã£ããã»ã€ã³ã¯ãããããã¹ããèšè¿°ããããã®æçšãªèšåã¯ã»ãšãã©ãªããããããçã説æã§ãã£ãŠãããŸã äœããªããããŸãã§ããïŒ
< figure >
< img src = "/commons/a/a7/Rorschach1.jpg" alt = "A shape with left-right
symmetry with indistinct edges, with a small gap in the center, two
larger gaps offset slightly from the center, with two similar gaps
under them. The outline is wider in the top half than the bottom
half, with the sides extending upwards higher than the center, and
the center extending below the sides." >
< figcaption > A black outline of the first of the ten cards
in the Rorschach inkblot test.</ figcaption >
</ figure >
以äžã¯ã代æ¿ããã¹ãã®éåžžã«æªãçšæ³ã§ãããããšã«æ³šæããïŒ
<!-- This example is wrong. Do not copy it. -->
< figure >
< img src = "/commons/a/a7/Rorschach1.jpg" alt = "A black outline
of the first of the ten cards in the Rorschach inkblot test." >
< figcaption > A black outline of the first of the ten cards
in the Rorschach inkblot test.</ figcaption >
</ figure >
ãã®ãããªä»£æ¿ããã¹ãã®ãã£ãã·ã§ã³ãå«ãããšã¯ãå®çšçã§ãªãããªããªããäžåºŠã§ããã£ãã·ã§ã³ãèªãã ãèããããšããã£ãå Žåã2å以äžå©ãããç»åãæããªããŠãŒã¶ãŒã«å¯ŸããŠãã£ãã·ã§ã³ã广çã«éè€ããããã§ããã
å®å šãªèª¬æãèŠãç»åã®å¥ã®äŸã¯ãå®çŸ©ã«ããã詳现ã§ç¡éã§ãããã©ã¯ã¿ã«ã§ããã
次ã®äŸã¯ããã³ãã«ããéåã®ç»åã®å®å šãªãã¥ãŒã®ä»£æ¿ããã¹ããæäŸãã1ã€ã®å¯èœãªæ¹æ³ã瀺ãã
< img src = "ms1.jpeg" alt = "The Mandelbrot set appears as a cardioid with
its cusp on the real axis in the positive direction, with a smaller
bulb aligned along the same center line, touching it in the negative
direction, and with these two shapes being surrounded by smaller bulbs
of various sizes." >
åæ§ã«ã人ã®é¡ã®åçã¯ãããšãã°äŒèšã«ãããŠãã³ã³ãã³ãã«ããªãé¢é£ããã³ã³ãã³ãã®éµãšèããããšãã§ããããããã¹ããå®å šã«ä»£æ¿ããã®ã¯å°é£ã§ããïŒ
< section class = "bio" >
< h1 > A Biography of Isaac Asimov</ h1 >
< p > Born < b > Isaak Yudovich Ozimov</ b > in 1920, Isaac was a prolific author.</ p >
< p >< img src = "headpics/asimov.jpeg" alt = "Isaac Asimov had dark hair, a tall forehead, and wore glasses.
Later in life, he wore long white sideburns." ></ p >
< p > Asimov was born in Russia, and moved to the US when he was three years old.</ p >
< p > ...</ p >
</ section >
ãã®ãããªå Žåããã®ãããªããã¹ãã¯ãç»åã®ååšãå ±åãããã©ãŠã¶ãŒèªäœã«åé·ã«ãªãããã代æ¿ããã¹ãã§ç»åèªäœã®ååšãžã®åç §ãå«ãããšã¯äžå¿ èŠã§ããïŒå®éã«æšå¥šãããªãïŒãããšãã°ã代æ¿ããã¹ãã"ã¢ã€ã¶ãã¯ã»ã¢ã·ã¢ãã®åç"ã§ãã£ãå Žåãé©åãããŠãŒã¶ãŒãšãŒãžã§ã³ãã¯ããæçšãª"ïŒç»åïŒã¢ã€ã¶ãã¯ã»ã¢ã·ã¢ãã¯é»ã髪ãé·ãé¡ã§ãçŒé¡ããã..."ãããããã"ïŒç»åïŒã¢ã€ã¶ãã¯ã»ã¢ã·ã¢ãã®åç"ãšããŠèªã¿äžãããããããªãã
ç»åãä»»æã®é¢é£ãã代æ¿ããã¹ãã®ãªãäžéšã®èªååãããæ¹æ³ã§åŸãããïŒããšãã°ãŠã§ãã«ã¡ã©ãªã©ïŒããŸãã¯ããŒãžãããŠãŒã¶ãŒãé©åãªãŸãã¯æçšãªä»£æ¿ããã¹ããæäŸã§ããªãå Žæã§ã®ãŠãŒã¶ãŒãæäŸããç»åã䜿çšããã¹ã¯ãªããã«ãã£ãŠçæãããŠããïŒããšãã°åçå ±æãµã€ãïŒããŸãã¯èè èªèº«ããç»åãäœã衚ãã®ããç¥ããªãïŒããšãã°ããã°ã§ç»åãå ±æããèŠèŠé害è ã®åçå®¶ïŒã®ãããããªã©ã®ãäžéšã®äžå¹žãªäŸã«ãããŠã䜿çšå¯èœãªä»£æ¿ããã¹ãããŸã£ããååšããªããããããªãã
ãã®ãããªå Žåãalt屿§ãçç¥ããŠãããããæ¬¡ã®ããããã®æ¡ä»¶ãããã«æºãããªããã°ãªããªãïŒ
imgèŠçŽ ã¯ãfigcaptionèŠçŽ ãšãã®åå«ãç¡èŠããŠãèŠçŽ éã®ç©ºçœæå以å€ã®ã³ã³ãã³ããå«ãfigcaptionèŠçŽ ãå«ãfigureèŠçŽ ã§ãããfigureèŠçŽ ã¯ãèŠçŽ éã®ç©ºçœæåããã³imgèŠçŽ ä»¥å€ã®ãããŒã³ã³ãã³ãåå«ãæããªãã
title屿§ãååšããã€ç©ºã§ãªãå€ãæã€ã
title屿§ã«äŸåããããšã¯ãå€ãã®ãŠãŒã¶ãŒãšãŒãžã§ã³ãããã®ä»æ§ã§èŠæ±ããããããªã¢ã¯ã»ã¹å¯èœãªæ¹æ³ã§å±æ§ãå
¬éããªããããçŸåšæšå¥šãããªãïŒããšãã°ãããŒã«ããããåºçŸãããããŠã¹ãªã©ã®ãã€ã³ãã£ã³ã°ããã€ã¹ãå¿
èŠã«ãªããããã¯ã¢ãã³ãªæºåž¯ç«¯æ«ãã¿ãã¬ããããã€äººã®ãããªãããŒããŒãã®ã¿ã®ãŠãŒã¶ãŒãšã¿ããã®ã¿ã®ãŠãŒã¶ãŒãç· ãåºãïŒã
ãã®ãããªå Žåã¯æå°éã«ä¿ãããã¹ãã§ãããå®éã®ä»£æ¿ããã¹ããæäŸããèœåãæããèè
ã®ããããªå¯èœæ§ãããå Žåãalt屿§ã®çç¥ã蚱容ããªãã ããã
ãµã€ãããã£ãã·ã§ã³ä»¥å€ã®ã¡ã¿ããŒã¿ãçšããŠç»åãåä¿¡ããå Žåãåçå ±æãµã€ãã®åçã¯ã次ã®ããã«ããŒã¯ã¢ããã§ããïŒ
< figure >
< img src = "1100670787_6a7c664aef.jpg" >
< figcaption > Bubbles traveled everywhere with us.</ figcaption >
</ figure >
ããããç»åã®éèŠéšåã®è©³çްãªèª¬æãããŠãŒã¶ãŒããååŸããŠããŒãžã«å«ãŸããå Žåãããã¯ããè¯ãã ããã
ãŠãŒã¶ãŒãæ®åœ±ããåçã§ã®èŠèŠé害è ãŠãŒã¶ãŒã®ããã°ã瀺ããæåã«ããŠãŒã¶ãŒã¯ã·ã§ãŒãæ®ã£ãåçã®ä»»æã®ã¢ã€ãã¢ãæããªããããããªãïŒ
< article >
< h1 > I took a photo</ h1 >
< p > I went out today and took a photo!</ p >
< figure >
< img src = "photo2.jpeg" >
< figcaption > A photograph taken blindly from my front porch.</ figcaption >
</ figure >
</ article >
ãããæçµçã«ããŠãŒã¶ãŒã¯å人ã«ããç»åã®èª¬æãååŸãããããããããã®å Žå代æ¿ããã¹ããå«ããããšãã§ããïŒ
< article >
< h1 > I took a photo</ h1 >
< p > I went out today and took a photo!</ p >
< figure >
< img src = "photo2.jpeg" alt = "The photograph shows my squirrel
feeder hanging from the edge of my roof. It is half full, but there
are no squirrels around. In the background, out-of-focus trees fill the
shot. The feeder is made of wood with a metal grate, and it contains
peanuts. The edge of the roof is wooden too, and is painted white
with light blue streaks." >
< figcaption > A photograph taken blindly from my front porch.</ figcaption >
</ figure >
</ article >
æãšããŠç»åå
šäœã®èŠç¹ã¯ãããã¹ãã®èª¬æãå©çšã§ããããŠãŒã¶ãŒã説æãæäŸãããããšãã°ãCAPTCHAç»åã®ãã€ã³ãã¯ããŠãŒã¶ãŒãæåéãã°ã©ãã£ãã¯ãèªãããšãã§ãããã©ããã確èªããããšã«ãããããã¯CAPTCHAãããŒã¯ã¢ãããã1ã€ã®æ¹æ³ã§ããïŒtitle屿§ã«æ³šç®ããïŒïŒ
< p >< label > What does this image say?
< img src = "captcha.cgi?id=8934" title = "CAPTCHA" >
< input type = text name = captcha ></ label >
(If you cannot see the image, you can use an < a
href = "?audio" > audio</ a > test instead.)</ p >
ãã1ã€ã®äŸã¯ãç»åã衚瀺ããæ£ãã代æ¿ããã¹ãããã€ããŒãžãæžãç®çã«å¯ŸããŠæ£ç¢ºã«ä»£æ¿ããã¹ããæ±ãããœãããŠã§ã¢ã§ããããã®ãããªããŒãžã¯æ¬¡ã®ããã«ãç»åã®ããŒãã«ãæã€ããšãã§ããïŒ
< table >
< thead >
< tr > < th > Image < th > Description
< tbody >
< tr >
< td > < img src = "2421.png" title = "Image 640 by 100, filename 'banner.gif'" >
< td > < input name = "alt2421" >
< tr >
< td > < img src = "2422.png" title = "Image 200 by 480, filename 'ad3.gif'" >
< td > < input name = "alt2422" >
</ table >
ãã®äŸã§ãããã§ããéãå€ãã®æçšãªæ
å ±ãäŸç¶ãšããŠtitle屿§ã«å«ãŸããããšã«æ³šæããã
äžéšã®ãŠãŒã¶ãŒã¯ããŸã£ããç»åã䜿çšã§ããªãïŒããšãã°ãéåžžã«äœéãªæ¥ç¶ã§ãããããã¹ãã®ã¿ã®ãã©ãŠã¶ãŒã䜿çšããŠããããã³ãºããªãŒã®èªåè»å£°ãŠã§ããã©ãŠã¶ãŒã§èªã¿ãããŠããŒãžãèããŠããããŸãã¯åã«ç®ãèŠããªãïŒã®ã§ãalt屿§ã¯çç¥ããããšãèš±å¯ãããããããããäžèšã®äŸã®ããã«ãŸã£ãã代æ¿ããã¹ããå©çšã§ãããäœãå©çšã§ããªãå Žåã«ã眮æããã¹ããåããã®ã§ãããèè
ã®äžéšã«ããåªåã®æ¬ åŠã¯ãalt屿§ãçç¥ããããã®èš±å®¹å¯èœãªçç±ã§ãªãã
äžè¬ã«ãèè
ã¯ç»åã衚瀺ãã以å€ã®ç®çã§imgèŠçŽ ã䜿çšããããšã¯é¿ããã¹ãã§ããã
imgèŠçŽ ãç»åã衚瀺ãã以å€ã®ç®çã§äœ¿çšãããŠããå Žåãããšãã°ãããŒãžãã¥ãŒãã«ãŠã³ããããµãŒãã¹ã®äžéšãšããŠçšããå Žåãalt屿§ã¯ç©ºæååã§ãªããã°ãªããªãã
ãã®ãããªå Žåãwidthãšheight屿§ã¯ãäž¡æ¹ãšã0ã«èšå®ãã¹ãã§ããã
ãã®ç¯ã¯ãå ¬ã«ã¢ã¯ã»ã¹å¯èœãªãããªãã¡ããŠã§ããµã€ãäžã®ææžãå ¬éã¡ãŒãªã³ã°ãªã¹ãã«éä¿¡ãããé»åã¡ãŒã«ããŸãã¯ãœãããŠã§ã¢ã®ããã¥ã¡ã³ããªã©ã察象ãšãªãèªè ãå¿ ãããå人çã«èè ã«ç¥ãããŠããªãææžã«ã¯é©çšãããªãã
ç»åããç»åãèŠãããšãã§ããããšãç¥ãããŠããç¹å®ã®äººã«åããç§çéä¿¡ïŒããšãã°HTML圢åŒã®é»åã¡ãŒã«ãªã©ïŒã«å«ãŸããå Žåãalt屿§ã¯çç¥ãããŠãããããããããã®ãããªã±ãŒã¹ã§ããããèè
ã¯ãïŒäžèšã®ãšã³ããªãŒã§èª¬æããããã«ãé¢é£ããç»åã®çš®é¡ã«å¿ããŠé©åã«ïŒä»£æ¿ããã¹ããå«ããããšã匷ãå§ãããçµæãšããŠããŠãŒã¶ãŒãç»åããµããŒãããªãã¡ãŒã«ã¯ã©ã€ã¢ã³ãã䜿çšããå ŽåããŸãã¯ææžãç»åãç°¡åã«èŠãããšã®ã§ããªããŠãŒã¶ãŒã«è»¢éãããå Žåãé»åã¡ãŒã«ã¯äŸç¶ãšããŠæçšã§ããã
Markup generators (such as WYSIWYG authoring tools) should, wherever possible, obtain alternative text from their users. However, it is recognized that in many cases, this will not be possible.
For images that are the sole contents of links, markup generators should examine the link target to determine the title of the target, or the URL of the target, and use information obtained in this manner as the alternative text.
For images that have captions, markup generators should use the figure and figcaption elements, or the title attribute, to provide the image's caption.
As a last resort, implementers should either set the alt attribute to the empty string, under the assumption that the image is a purely decorative image that doesn't add any information but is still specific to the surrounding content, or omit the alt attribute altogether, under the assumption that the image is a key part of the content.
Markup generators may specify a generator-unable-to-provide-required-alt attribute on img elements for which they have been unable to obtain alternative text and for which they have therefore omitted the alt attribute. The value of this attribute must be the empty string. Documents containing such attributes are not conforming, but conformance checkers will silently ignore this error.
This is intended to avoid markup generators from being pressured into replacing the error of omitting the alt attribute with the even more egregious error of providing phony alternative text, because state-of-the-art automated conformance checkers cannot distinguish phony alternative text from correct alternative text.
Markup generators should generally avoid using the image's own filename as the alternative text. Similarly, markup generators should avoid generating alternative text from any content that will be equally available to presentation user agents (e.g., web browsers).
This is because once a page is generated, it will typically not be updated, whereas the browsers that later read the page can be updated by the user, therefore the browser is likely to have more up-to-date and finely-tuned heuristics than the markup generator did when generating the page.
A conformance checker must report the lack of an alt attribute as an error unless one of the conditions listed below applies:
The img element is in a figure element that satisfies the conditions described above.
The img element has a title attribute with a value that is not the empty string (also as described above).
The conformance checker has been configured to assume that the document is an email or document intended for a specific person who is known to be able to view images.
The img element has a (non-conforming) generator-unable-to-provide-required-alt attribute whose value is the empty string. A conformance checker that is not reporting the lack of an alt attribute as an error must also not report the presence of the empty generator-unable-to-provide-required-alt attribute as an error. (This case does not represent a case where the document is conforming, only that the generator could not determine appropriate alternative text â validators are not required to show an error in this case, because such an error might encourage markup generators to include bogus alternative text purely in an attempt to silence validators. Naturally, conformance checkers may report the lack of an alt attribute as an error even in the presence of the generator-unable-to-provide-required-alt attribute; for example, there could be a user option to report all conformance errors even those that might be the more or less inevitable result of using a markup generator.)