HTML

오픈소스 비즈니스 컨설팅
둘러보기로 가기 검색하러 가기

HTML 4.01을 정리한다.

HTML 문법

HTML 기초

  • HTML 선언
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
         "http://www.w3.org/TR/REC-html40/strict.dtd">

  • Meta 태그
  • Content type과 Charset을 지정
<meta http-equiv="Content-type" content="text/html; charset=euc-kr">
  • HTML의 default Script type 지정
<meta http-equiv="Content-Script-Type" content="JavaScript">
  • HTML의 default Style type 지정
<meta http-equiv="Content-Style-Type" content="text/css">
  • 5초후 자동으로 입력한 url로 화면 전환 설정
<meta http-equiv="refresh" content="5;url=http://www.jopenbusiness.com/">
<meta name="author" content="pnuskgh">
<meta name="keywords" content="HTML">
<meta name="description" content="Standard Samplie HTML 4.0">
<meta name="moddate" content="1999/03/02">
  • Base 태그
  • HTML의 모든 URL의 기본 베이스 설정
<base href="http://www.jopenbusiness.com/">
  • HTML의 기본 font 사이즈
<basefont size=3>

외부 문서 호출

  • Stylesheet 호출 및 선언
<link rel="stylesheet" type="text/css" href="style.css">
<style type="text/css" media=screen>
    :hover { text-decoration:none; color:yellow; background-color:green; }
</style>
  • JavaScript 호출 및 선언
<script type="text/JavaScript" src="standard.js"></script>
<script type="text/JavaScript">
</script>
  • Iframe 호출 및 선언
<iframe src="testFrame.htm"></iframe>

Form 태그

Input 태그

  • file type의 Input 태그
<form enctype="multipart/form-data" method="post" action="/fileTest.asp">
    <input name="theFile" type="file"></input>
</form>
  • 입출력 모드 변환 : 한글, 영문
한글 : <input type="text" name="town" size="12" style="ime-mode:active;"></input>
영문 : <input type="text" name="town" size="12" style="ime-mode:inactive;"></input>

window.document.theForm.theField.style.imeMode = "active";
  • Input 필드 길이 고정
<input type="text" name="town" size="12" style="text-overflow:ellipsis; overflow:hidden;"></input>
  • form Tag
  <form name="theForm" method="post" action="~" target="_top, _blank"
         onReset="JavaScript:return fncReset();" onSubmit="JavaScript:return fncSubmit();">
       window.document.theForm.elements[], elements.length;
       window.document.theForm.reset(), submit();

       <input type="text, password" name="theText" value="~" size="10" maxlength="10" readonly
              onFocus="JavaScript:fncFocus(this.form, this);" onBlur="" onChange="" onSelect=""></input>
       <input type="hidden" name="theText" value="~"></input>
       <input type="file" name="theText" size="50" value="~"
              onFocus="" onBlur="" onChange="" onSelect=""></input>
           window.document.theForm.theText.value, name, defaultvalue, type;
           window.document.theForm.theText.focus, blur(), select();
		for (var i = 0;i < window.document.formCheckMailBox.folderName.length;i++) {
		    window.alert(window.document.formCheckMailBox.folderName[i].value);
		}

       <input type="button, submit, reset" name="theButton" value="~" onClick=""></input>
           window.document.theForm.theText.click();

       <input type="checkbox, radio" name="theCheckbox" value="1" checked onClick="">내용</input>
           window.document.theForm.theCheckbox.checked, default, length, name, value;
           window.document.theForm.click();
   var MailQuota = <xsl:value-of select="/dmml/baseinfo/MailUser/@MailQuota" />;
    
<input type="checkbox" id="id_chk_select_all">
<label for="id_chk_select_all">Select All</label>
    
   if (MailQuota == 0) {
       window.document.UpdateUserForm.mailQuotaType[0].click();
   } else if (MailQuota < 0) {
       window.document.UpdateUserForm.mailQuotaType[1].click();
   }

       <select name="theSelect" size="1" multiple onFocus="" onBlur="" onChange="">
           window.document.theForm.theSelect.selectedIndex, length, name, options[], options.length;
           <option value="1" selected>내용</option>
               window.document.theForm.theSelect.options.text, value, selected, index, type, defaultselected;
               window.document.theForm.theSelect.length = 0;
               window.document.theForm.theSelect.options[window.document.theForm.theSelect.length] = new Option("text", "value");
               window.document.theForm.theSelect.options[window.document.theForm.theSelect.selectedIndex].value
       </select>

       <textarea name="theTextarea" rows="5" cols="60" wrap="off, virtual, physical"
                 onFocus="" onBlur="" onChange="" onSelect="">내용</textarea>
   </form>

플래시 삽입

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" 
 codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0"
 width="400" height="510">
    <param name="movie" value="KMC_02.swf">
    <param name="quality" value="high">
    <param name="wmode" value="transparent">
    <embed src="logoin.swf" quality="high"
        pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"
        type="application/x-shockwave-flash" width="400" height="510">
    </embed> 
</object>

Event 처리

참고 문헌