Body 태그

페이지 정보

작성자 관리자 작성일 70-01-01 09:00 조회 21 댓글 0

본문

▷ Body 태그

⊙ 태그요소

① <Body> ... </Body>

Body : 몸통 부분, 본체

Html 문서 중 화면에 표시되는 부분이다.

⊙ 속성(Atributes)

속성
용도
기본값
사용법
bgcolor

배경색

White

bgcolor="color" (color = 색이름, RGB 코드)

background

배경이미지, 파일명 또는 URL

 

background="파일이름/경로:URL"

bgproperties

배경이미지 속성

 

bgproperties="값" (값 = fixed, Null)

alinked
링크색 지정
Red
alinked="color" (color = 색이름, RGB 코드)
link
링크 되어 있는 곳 지정
Blue
link="color"
vlink
방문한 링크 색 지정
Purple
vlink="color"
text
기본 글자 색 지정
Black
text="color"
class
스타일 시트에 정의된 서식 적용, class
 
class="a Variable"
id
스타일 시트에 정의된 서식 적용, id
 
id="a Variable"
topmargin
문서 윗여백
15 px
topmargin="a pixel"
leftmargin
문서 아랫여백
10 px
leftmargin="a pixel"
scroll
스크롤 지정
Yes
scroll="yes or no"

⊙ BGColor 사용 예

코드 작성

실행결과

<html>
<head>
<title>무제 문서</title>
</head>
<body
bgcolor="#333333"
alinked="red" link="cyan"
vlink="green" text="yellow"
class="myclass" id="myid"
topmargin="30" leftmargin="20"
scroll="no">
적용된 body 속성
<hr>

bgcolor="#333333"
alinked="red" link="cyan" 
vlink="green" text="yellow"
class="myclass" id="myid"
topmargin="30" leftmargin="20"
scroll="no"
<hr>
<a href="http://naver.com"
target="_blank">네이버 링크</a>
</body>
</html>
                      

⊙ BackGround 사용 예

<bgcolor>와 <background> 태그가 같이 사용되면 background 이미지가 우선입니다.
문서보다 작은 이미지가 지정되면 자동으로 반복해서 채워집니다.

<bgproperties> 속성은 이미지에 대한 내용이므로, <background>가 지정되어있어야 적용됩니다.

Null - 스크롤하게 되면 문서 내용이 배경과 같이 움직인다.
Fixed - 배경이 고정되어 문서의 내용이 고정된 배경 그림위에서 움직인다.

코드 작성

실행결과

                          
<html>
<head>
<title>무제 문서</title>
</head>
<body
bgcolor="#333333" 
background="images/bg.jpg"
bgproperties="fixed"
alinked="red" link="cyan"
vlink="green" text="yellow"
class="myclass" id="myid"
topmargin="30" leftmargin="20"
scroll="no">
적용된 body 속성
<hr>

bgcolor="#333333"
background="images/bg.jpg">
bgproperties="fixed"
alinked="red" link="cyan" 
vlink="green" text="yellow"
class="myclass" id="myid" 
topmargin="30" leftmargin="20" 
scroll="no" 
<hr>
<a href="http://naver.com" 
target="_blank">네이버 링크
</body>
</html>
                      

▷ Basefont 태그

⊙ 태그요소

① <Basefont> ... </basefont>

Basefont 기본글꼴

Html 문서의 기본 글꼴을 설정하는 태그로 <head>나 <body>에 사용할 수 있다.
종료태그는 생략 가능하다.

⊙ 속성(Atributes)

속성
용도
기본값
사용법
Color

기본글꼴의 색 지정

Black

color="color" (color = 색이름, RGB 코드)

Face

기본글꼴의 지정

굴림

face="글꼴이름"

Size

기본글꼴의 크기 지정

3

size="글꼴크기", 1~7, 기본값=3

댓글목록 0

등록된 댓글이 없습니다.

알림 0