Template

안해.

Table

https://coding-factory.tistory.com/184

<table>

table 만드는 태그

<th>

테이블의 헤더 부분을 만드는 태그

<tr>

테이블의 행을 만드는 태그

<td>

테이블의 열을 만드는 태그

input button

action

<a>로 post

https://stackoverflow.com/questions/6180256/post-from-an-a-tag

불가.

근데 form으로 감싸서 인풋들 숨기고 버튼 누르게 하는 건 가능.

<form action="theUrl" method="POST">

<input type="hidden" name="param1" value="val" />
<input type="hidden" name="param2" value="val2" />

<a href="#" onclick="this.parentNode.submit()">Go to that link!</a>

</form>

얜 a쓰긴 했는데 뭐 어때. 난 submit 버튼쓸거임.

파일 업로드

<input type="file">

그리고 form의 attribute로

enctype="multipart/form-data"

를 적어줘야함.

그리고 완전 중요한거

같은 form 안에 hidden 으로 MAX_FILE_SIZE를 꼭 명시해 줘야 함! 안그럼 업로드 자체가 안 됨!

<input type="hidden" name="MAX_FILE_SIZE" value="30000" />

value의 단위는 byte임.

'공부 > Web' 카테고리의 다른 글

php email  (0) 2022.10.11
php Programming Language Tutorial - Full Course  (0) 2022.10.11
Learn Basic CSS by Building a Cafe Menu 정리  (0) 2022.09.21
Learn HTML by building a Cat Photo App 정리  (0) 2022.09.20

Sending email

SMTP: 간이 우편 전송 프로토콜

How PHP email sending works: SMTP authentication and HTML templates

<?php
mail($to_email_address,$subject,$message,[$headers],[$parameters]);
?>

subject가 뭐야?

https://www.php.net/manual/en/function.mail.php

subject

Subject of the email to be sent.Caution Subject must satisfy » RFC 2047.

그, 메일 열기 전에 빼꼼 보이는 그거 말하는 건가봐. 아하.

아아아 걍 메일 이름임 ㅋㅋ

header는string도 되고 array도 되고

에러 뜸

PHP Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set()

https://websistent.com/using-sendmail-on-windows/

메일서버가 있어야 한다네;;;;;;

smtp.gmail.com를 쓰자

ssl은 포트 465

tcp는 587

https://hyunmin1906.tistory.com/276

안되네

다시 처음부터 해보자

SMTP 서버를 구축할라면… 윈도우즈 서버를 설치해야 하는데.

그러고싶진 않은데.

다시 smtp.gmail을 알아보자

PHPMailer라는 걸 쓰면 세상 편해지는 것 같은데…

이번 과제에서 이해 못한 코드는 쓰지 말랬단말이지. 너무해.

이메일이란 게 겁나 어려운 거였구나.

이게 리눅스나 맥은 sendmail이라고 자체 메일서버가 있는데 윈도우만 없는 거였음. 우분투에서 돌려볼까.

Checking filesystem, this may take some time - it will not hang!
  ...   Done.

Checking for installed MDAs...
Creating /etc/mail/sasl/sasl.m4...

Ah, you're setup with SASL2 !

Unfortunately, there is no automagic way to migrate to /etc/sasldb2 :(

You'll want to make sure /etc/default/saslauthd is setup to start,
and has at least MECHANISMS="pam" !

If you find out what more is needed, please let me know!

Creating/Updating SSL(for TLS) information
Creating /etc/mail/tls/starttls.m4...
You already have sendmail certificates

*** *** *** WARNING *** WARNING *** WARNING *** WARNING *** *** ***

Everything you need to support STARTTLS (encrypted mail transmission
and user authentication via certificates) is installed and configured
but is *NOT* being used.

To enable sendmail to use STARTTLS, you need to:
1) Add this line to /etc/mail/sendmail.mc and optionally
   to /etc/mail/submit.mc:
  include(`/etc/mail/tls/starttls.m4')dnl
2) Run sendmailconfig
3) Restart sendmail

Checking {sendmail,submit}.mc and related databases...
Reading configuration from /etc/mail/sendmail.conf.
Validating configuration.
Creating /etc/mail/databases...
Reading configuration from /etc/mail/sendmail.conf.
Validating configuration.
Creating /etc/mail/databases...
Reading configuration from /etc/mail/sendmail.conf.
Validating configuration.
Creating /etc/mail/Makefile...
Reading configuration from /etc/mail/sendmail.conf.
Validating configuration.
Writing configuration to /etc/mail/sendmail.conf.
Writing /etc/cron.d/sendmail.
Disabling HOST statistics file(/var/lib/sendmail/host_status).
Creating /etc/mail/sendmail.cf...
Creating /etc/mail/submit.cf...
Informational: confCR_FILE file empty: /etc/mail/relay-domains
Informational: confCT_FILE file empty: /etc/mail/trusted-users
Updating /etc/mail/access...
Informational: ALIAS_FILE file empty: /etc/mail/aliases
Updating /etc/mail/aliases...
/etc/mail/aliases: 0 aliases, longest 0 bytes, 0 bytes total
Reload the running sendmail now with the new configuration? [Y] Y
Reloading sendmail ...

 

결론

 

 

https://askubuntu.com/questions/12917/how-to-send-mail-from-the-command-line

우분투에서 ssmtp를 이용해서 smtp.gmail.com을 씁시다. 이거 쓰니까 되네요.

  1. Install ssmtp :
  2. sudo apt-get install ssmtp
  3. Edit the ssmtp config file:
  4. gksu gedit /etc/ssmtp/ssmtp.conf
  5. Append the following text:
  6. root=username@gmail.com mailhub=smtp.gmail.com:465 rewriteDomain=gmail.com AuthUser=username AuthPass=password FromLineOverride=YES UseTLS=YES
  7. Run ssmtp and provide the recipient email address:
  8. ssmtp recepient_name@gmail.com
  9. Provide the message details as follows:
  10. To: recipient_name@gmail.com From: username@gmail.com Subject: Sent from a terminal! Your content goes here. Lorem ipsum dolor sit amet, consectetur adipisicing. (Notice the blank space between the subject and the body.)
  11. Press Ctrl + D to send.

이거 하고 나서도, php.ini를 수정해줘야 함. 그 파일에 mail파트가 있음.

계정 비밀번호가 아니라, 구글 계정관리>보안탭에 있는 앱 비밀번호를 만들어서 써야 한다.

'공부 > Web' 카테고리의 다른 글

html 좀더 공부  (0) 2022.10.11
php Programming Language Tutorial - Full Course  (0) 2022.10.11
Learn Basic CSS by Building a Cafe Menu 정리  (0) 2022.09.21
Learn HTML by building a Cat Photo App 정리  (0) 2022.09.20

https://www.youtube.com/watch?v=OK_JCtrrv-c

// 위 주소에서 본건 사실상 거의 없음 ㅎㅎ

PHP IS DYING

그래서 그리 깊게는 안팔거임. 다른 언어랑 비슷해보이기도 하구.

알던 게 많아서 적당히 넘기면서 봄.

php작성

<?php /*your code here*/ ?>

주석

// 이거도 되고
# 이거도 됨
/* 
이거도 되네
*/

줄 끝마다 세미콜론이 옴.

변수

변수명은 $가 선행됨. 자료형은 안 붙네. 메인 자료형은 string, int, float, boolean

$name=”wilson”;
$age=999;
$weight=3.14;
$smart=true;

null 도 있다.

string[index]: index. 그 index는 int임

string 은 . 연산자로 합칠 수 있음.

array

$numbers=array(1,5,34,6,22,7,65);

php에서 html 쓰기

echo “내용”

strtolower(string) : 소문자 만들기

strtoupper(string) : 대문자 만들기

strlen(string): 문자열 길이

str_replace(str1, str2, original_string): original_string에 있는 str1을 모두 str2로 바꾸기.

substr(string, index, length): string에 index번째에 있는

문자열 합치기는 ‘.’

윈도우

php서버에서 환경변수(environment variables) 사용

환경변수를 설정할 때에는 cmd창에서

$ set variableName=value

한 다음 (이상하게 환경변수설정 창 열어서 수정한건 php에서 안 불러지더라. 왜지?)

php에서 받아오는 명령어는

getenv('variableName')

하면 됨.

api key라던가 데이터베이스 비번 등을 안전하게 사용할 수 있음. 깃헙같은 데에 올려도 코드상에 노출이 안 되니까.

함수

function name($parameters){
	#명령어들
	return blahblah;
}

get 과 post 인자 받기

get으로 전달된 건

$asd=$_GET['name'];

post로 전달된 건

$asd=$_POST['name'];

root directory

“/”로 경로를 시작하면 됨

이거 없이 하면 현재 php파일이 있는 곳에서부터 출발임.

try catch

try{

}catch(Exception $e){

}

Redirection

header( 'Location: <url>' );
<script>
	location.href="<url>"
</script>

위 두가지 방법이 있다.

header()로는 post를 할 수 없다.(get은 가능)

js로 포스트 하는 방법: https://stormpy.tistory.com/146

session

session_start();
/*세션 쓰는 php파일 마다 선언 해줘야 함. 
심지어 session을 destory하는 파일에도 session_destroy()앞에 적어줘야 함.*/

$_SESSION["name"]="wilson";

session_destroy();//이거 전까지 세션 유지

비교연산자

는 별게 다되네. 걍 떠오르는 대로 쓰면 되겠다.

random

https://extbrain.tistory.com/35

겁나 간단

rand(min,max)

형변환

할 필요 있나. 어차피 숫자도 문자랑 바로 합쳐지는 것 같던데.

반대 연산의 경우 모르겠지만. 당장은 필요없.

foreach

foreach($array as $value){}

array 비교

array_diff($array1,$array2)

client IP 체크

$ip = $_SERVER['REMOTE_ADDR'];

page가 아닌 다른 자료형 리턴

몰루

현재 시간 구하기

https://www.guru99.com/php-date-functions.html

date(format)

format은 스트링. “Y-m-d” 하면 YYYY-MM-DD 가 리턴됨

“Y”하면 연도만

시간은?

time()

현재 시간을 초로 싸그리 바꿔서 리턴

지역은 php.ini 파일에서 수정 가능.

string split

https://doolyit.tistory.com/167

세가지가 있음

내가 필요한 건 한가지.

explode(' ',$string)#공백으로 split. 문자열의 리스트를 리턴

헐. 시간 비교하는 더 간단한 방법

https://stackoverflow.com/questions/14351022/time-since-mysql-timestamp-php

strtotime("2013-01-15 19:46:11")-strtotime("2013-01-15 12:46:11")

헐 더더 간단한 방법

https://dev.mysql.com/doc/refman/8.0/en/date-and-time-functions.html#function_timediff

mySQL에 걍 함수가 있네.

mysql> SELECT TIMEDIFF('2000-01-01 00:00:00',
->                 '2000-01-01 00:00:00.000001');
-> '-00:00:00.000001'
mysql> SELECT TIMEDIFF('2008-12-31 23:59:59.000001',
->                 '2008-12-30 01:01:01.000002');
-> '46:58:57.999999'

업로드된 파일 받아오기

https://www.everdevel.com/PHP/uploading-file/

공식 문서: https://www.php.net/manual/en/features.file-upload.post-method.php

$_FILE['<그 file input tag의 name>']

만약 이름을 가져오고싶다 하면

$_FILE['<그 file input tag의 name>']['name']

그리고

https://www.php.net/manual/en/function.move-uploaded-file.php

move_uploaded_file($_FILES['<그 file input tag의 name>']['tmp_name'],$uploadfile)

파일을 업로드하면 서버의 임시 디렉토리에 저장되는데, 그걸 위 함수를 쓰면 이럭 처리하는 php파일이 있는 폴더로 오게 됨.

그리고 성공시 true 실패시 false 리턴

음, 그 공식 docs에 좋은 코드가 있네

<?php
$uploads_dir = '/uploads';
foreach ($_FILES["pictures"]["error"] as $key => $error) {
		#반복문으로 에러 체크 하는 코드
    if ($error == UPLOAD_ERR_OK) {
        $tmp_name = $_FILES["pictures"]["tmp_name"][$key];
        // basename() may prevent filesystem traversal attacks;
        // further validation/sanitation of the filename may be appropriate
        $name = basename($_FILES["pictures"]["name"][$key]);
        move_uploaded_file($tmp_name, "$uploads_dir/$name");
    }
}
?>

파일 이름의 max length 운영체제마다 다르다고 함

보니까, DB에 적당히 300자로 자료형 크기 맞춰놓으면 되겠다.

mkdir

https://www.php.net/manual/en/function.mkdir.php

mkdir(
    string $directory,
    int $permissions = 0777,
    bool $recursive = false,
    ?resource $context = null
): bool

mySQL

mysql과 연동

connect

$conn=mysqlli_connect('localhost', 'user name', 'db password', 'db name')

쿼리

mysqli_query($conn,$sql)

$sql 끝엔 세미콜론 없어도 되네

음? 저 위 명령어는 없고

mysqli_master_query($conn,$sql)
mysqli_slave_query($conn,$sql)

둘 중 하나를 골라쓰라는데…

slave로 해봐야지.

엥 뭐야 걍 mysqli_query도 있네.

$row = mysqli_fetch_array($result);

mysqli_fetch_array($result,resulttype)

$result에서 한 줄씩 가져옴. 함수 호출할 때마다 순서대로.

resulttype은 뭔지 모르겠음. optional임

mysqli_fetch_array로 반복문 돌리기

while($row=mysqli_fetch_array($result)){}

mysqli_num_rows($result)

row 개수 세기

\n을 <br>로 바꾸기

nl2br(string $stringbool $use_xhtml
 = **true**
): string

걍 string을 nl2br()로 감싸면 된다 생각하면 됨.

가장 최근에 INSERT한 거, 자동 생성된 id 가져오기.

mysql_insert_id()

맨 마지막에 mysqli_query로 insert 한거 id 가져오기.

$conn->insert_id

하면 됨

insert_id가 함수가 아님에 유의.

'공부 > Web' 카테고리의 다른 글

html 좀더 공부  (0) 2022.10.11
php email  (0) 2022.10.11
Learn Basic CSS by Building a Cafe Menu 정리  (0) 2022.09.21
Learn HTML by building a Cat Photo App 정리  (0) 2022.09.20

깜빡하고 다음 챕터(Lean CSS Colors by building a Set of Colored Markers) 초반부 내용도 조금 들어가버렸다.

html 관련

self-closing tag를 쓸 때 아래처럼 맨 마지막에 ‘/’르 넣기도 한다. 없어도 애러는 안 남.

<meta charset="UTF-8" />

**<head>**안에

<link/>라는 element도 있음. CSS 파일 불러와서 적용할 때 사용.

<link rel=”stylesheet” href=”adress” />

<body> 안에서 정리할 때

<header>, <main>, <footer>

<section>이란 것도 있음. 이것도 header, main, footer 등 안에서 element들 묶을 때 씀

<article>말 그대로. 작은 내용..?. 보통 서로 관련있는 여러개의 정보가 들어간다고 함..

모바일에서도 페이지 잘보이게 하려면 아래 코드 복붙. <header>안에.

<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<div>

디자인을 위한 태그

<hr/>

가로 줄 긋기. 컨텐츠 구분선.

CSS

<head> 안에 <style> element를 넣음으로써 시작

하지만 CSS가 너무 길어질 테니 다른 파일로 따로 빼는 게 좋음.

<head> 안에 <link/>추가 후 attribute로 rel=”stylesheet” href=”.css file” 하면 됨.

<style> tag안에선 (=CSS는) 아래와 같은 스타일로 코드를 짬.

element {
 property: value;
}

/*or*/

selector1, selector2, selector3{
	property: value;
}

/*or*/

.classSelctor{
	property: value;
}

element로 스타일을 지정할 수도 있지만, class를 지정해서 clas로 스타일을 지정할 수 있다.

classSelctor는 이름 앞에 온점(.)이 와야 함.

그리고 html의 element에는 attribute중 class 값을 지정. (문자열) 근데 html은 다 걍 문자열인가벼. 그리고 class 여러 개 지정할 때는 사이에 공백 하나 두기.

<element class=”class1 class2”>

특정 class의 element 아래에 있는 특정 element들을 지정하려면 아래 처럼.

.classSelector element{
	property: value;
}

이미 지정한 element나 class들을 아래에서 새로 셀렉터 쓰고 중괄호 열어서 지정할 수 있다.

peudo-selector는 element인데 조건 붙는 거(visited, hover(mouse on), active(mouse down) …)

a:visited{
	color:black;
}

properties below

text-align: 텍스트 얼라인. center=센터. 따옴표 없음.

background-color: 배경색. black white red같은것도 되는데, rgb(255,255,255)도 됨

background-image: 배경 이미지. 입력은 다음과 같이. url(https://~~~~.jpg)

width: 가로. 300px 같이 픽셀지정, 80%같이 비율지정 둘 다 가능.

max-width: 퍼센트로 했을 때 막 화면 커지면 너무 element도 커지니까 이거로 제한.

height: 높이

display: 디스플레이. value로 inline-block 하면 inline-block이 됨. block이라고 하면 block-level이 됨.

font-family: 폰트. 브라우저 디폴트 폰트 말고 바꾸고 싶을 때. 브라우저들이 공통으로 지원하는 폰트가 있음. 여기선 sans-serif 씀

font-style: 폰트 스타일. italic

font-size: 폰트 사이즈

border-color: 상하좌우 테두리 모두의 색깔

margin

element주변에 안 보이는 공간

margin-left, margin-right: 마진 두께. 둘다 auto하면 두개가 같아짐. element는 자동으로 가은데에 오겠지.

걍 margin: 하고 깡그리 한번에 정하는걸 shorthand라고 함. 그리고 띄어쓰기를 사이에 두고 값 두개를 연달아 적으면 첫번쨰 거는 top, bottom, 두번째 거는 left, right로 입력됨.

padding

element안에 테두리에 빈 공간. 여백. 안에 내용을 밀어넣는 느낌이라기보단, 걍 더 살찌네 element가.

padding-left, padding-right, 그리고 top도 있고 bottom도 있고.

그리고 걍 padding: value;하면 상하좌우 길이가 다 똑같아지고.

tips

inline block은 element들의 width만 신경 씀. 그래서 붙어버리기 쉬움. 따로 지정하면 좋음.

p를 display를 만져서 inline-block처럼 다루면 p element의 오른쪽에 추가로 공간이 생겨버려서, 다음 p가 줄바꿈이 됨. p의 width 퍼센트를 낮추면 해결됨(ex) 50%→49%

뭔가 공간이 있을 땐 html상에서 두 element의 사이에 아무것도 없게 딱 붙이면 됨.

그러면 49로 바꿀 필요도 없이 50퍼로 둬도 되네. 더 깔끔하네.

fallback: value가 available 하지 않을 때 차선책으로 쓸 것. 예시:

font-family: Impact, serif;

<h1>은 margin에 default로 값이 부여돼있음.

size같은 거 0으로 지정할 땐 px같은 단위 안 붙여도 됨.

그리고 negative한 수를 입력할 수도 있음.

<img/>는 inline처럼 행동함.

margin:auto하면 화면 중간에 배치될 줄 알았는데 위아래는 중간 정렬이 안되네?

RGB: 모니터

CMYK (cyan, magenta, yellow, black): 프린터

Lean CSS Colors by building a Set of Colored Markers

html 관련

class 여러 개 지정할 때는 사이에 공백 하나 두기.

<element class=”class1 class2”>

<br>: 줄바꿈

CSS 관련

tips

margin:auto하면 화면 중간에 배치될 줄 알았는데 위아래는 중간 정렬이 안되네?

RGB: 모니터

CMYK (cyan, magenta, yellow, black): 프린터

red green blue 기본값중에서 green은 (0,255,0)이 아니라 (0,127,0)이다.

 

이건 하다가 멈춤

'공부 > Web' 카테고리의 다른 글

html 좀더 공부  (0) 2022.10.11
php email  (0) 2022.10.11
php Programming Language Tutorial - Full Course  (0) 2022.10.11
Learn HTML by building a Cat Photo App 정리  (0) 2022.09.20

head

<meta>

self-closing

attributes

charset: 은 UTF-8 적기. 유니코드 관련이니까.

title

탭 이름에 적을 내용.

<title>name of the page</title>

body

중요도

<h1> </h1>~ <h6> </h6>

h1이 제일 큰거.

단락 (Paragraph)

<p> </p>

<p> 안에 있는 거 전 후로 줄바꿈이 된다.

주석

<!— description —>

사진 (image)

<img src="<url of the image>" alt="a text to show when the image is failed to load">

src: image의 주소를 나타냄.

alt: image 로드를 실패했을 때 그 자리에 띄울 text

onerror: image 로드에 실패했을 때 실행할 자바스크립트 코드. <script>태그 막아놓은 거 우회할 때 씀.

하이퍼링크(link)

<a href="url" target="some option here">some element(eg; text, image, ...)</a>

attributes

href: 눌렀을 때 연결될 주소

target: 어디서 열 건지. “_blank”는 새 탭에서 링크를 연다.

리스트(unordered list)

<ul>
	<li>element1</li>
	<li>element2</li>
	<li>element3</li>
	...
</ul>

ordered list는 <ul> 대신 <ol>로 감싸면 됨. 각 항목마다 번호가 순서대로 붙는다는 점이 다름.

figure

<figure>
	<img src="url">
	<figcaption>description</figcaption>
</figure>

figure 안에 있는 element를 연관성 있게 묶는 용도

figure tag로 감싸면 내용물이 들여쓰기 됨.

**<figcaption>**은 image(아마 img 말고 다른 element도 될 것 같음)의 description을 달 때 사용.

강조(emphasize)

em

<em></em>

강조… 인데… 감싸면 이탤릭체로 적힘.

strong

<strong></strong>

이게 볼드체

form

<form action="/submit-url">
	<input type="type" name="some name here">
</form>

유저에게서 정보를 입력받기 위한 폼

attributes

action: form의 데이터가 보내져야 할 주소

<input>

유저 인풋 받는 곳. self-closing

attributes

type: input type. 디폴트는 한줄짜리 text field(= “text”).

name: input의 이름. 나중에 이 전보를 받는 곳에서 이 특정 인풋의 정보에 엑세스하려면 꼭 필요함.

placeholder: textfield의 힌트

required: submit하기 위해 input에 꼭 들어있어야 할 내용. required만 적고 아무 값도 안적으면 그냥 빈칸으로 제출하는 것만 막아줌.

“radio”는 하나만 선택하는 객관식. 내용은 아래처럼 적음.

<label><input type="radio" name="wilson" value="choice1" id="choice1" checked>choice1</label>
<label><input type="radio" name="wilson" value="choice2" id="choice2">choice2</label>
<label><input type="radio" name="wilson" value="choice3" id="choice3">choice3</label>

여러개의 radio button이 name이 같으면 그중 하나만 체크할 수 있음.

submit버튼을 누르면 radio에선 value을 전달함. 만약 value가 없으면 wilson=on을 반환할건데, 이건 multiple choice에선 쓸 데가 없음. attribute로 checked를 넣어두면 디폴트로 체크가 돼있음. 값은 안 넣음.

“checkbox”는 체크박스. 마찬가지로 checked attribute가 있음.

<label>

radio를 위처럼 만들면 동그라미 눌렀을 때만 체크가 되고, 텍스트 눌렀을 떄는 체크가 안 됨. <input>과 텍스트를 <label>태그로 감싸주면 텍스트 눌러도 체크가 됨.

혹은 <input> 옆에 Text를 <label>로 감싸고 attribute로 for=하고 input의 id를 넣음.

<button>

걍 버튼. opening tag랑 closing tag 사이에 있는 텍스트가 버튼 안에 들어감.

버튼이 form안에 있고 아무 attribute를 지정 안해주면 그냥 디폴트로 form의 내용을 action에 넣은 URL으로 보내주는 역할을 함.

attributes

type: 타입. supmit button을 명시적으로 만들려면 (type=”submit”)

<fieldset>

lable과 input을 묶어주는 역할을 함.

새 줄에 나타남.

네모로 감싸짐

<legend>

caption for content in the <fieldset>

네모 윗줄에 걸쳐서 쓰여짐. 예쁘다

개념

self-closing tag

closing tag 가 없는 tag는 self-closing tag 라고 부름

HTML에선 태그의 속성을 부여하기 위해서 opening tag에 값을 넣을 수 있음(attribute)

inline elements:

새 줄에서 만들어지지 않는 element들

block-level elements:

새 줄에서 나타나는 element들

nesting

<main> </main>
<footer></footer>

들여쓰기: indentation

html은 스페이스 2칸만큼 들여쓰기임. tab하면 그냥 한번에 들어가짐.

id

HTML 에 있는 특정 element를구분하기위해 사용 됨. 모든 id는 unique해야 함. 값은 text

<input id="indoor" type="radio">

<head>, <body>

중요한 정보는 head에, 렌더링 되어야 하는 element들은 body에 nest.

<html>

모든 html코드는 <html>안에 있어야 함

attributes

lang: 페이지의 메인 언어. “en”은 영어

<!DOCTYPE html>

그리고html에 앞서 모든 코드는 <!DOCTYPE html>이 선행돼야 함.

'공부 > Web' 카테고리의 다른 글

html 좀더 공부  (0) 2022.10.11
php email  (0) 2022.10.11
php Programming Language Tutorial - Full Course  (0) 2022.10.11
Learn Basic CSS by Building a Cafe Menu 정리  (0) 2022.09.21

+ Recent posts