본문 바로가기

소프트웨어/JavaScript

[HTML] <br>, <p>, <img>

오늘은 인기 태그인 <br>, <p>,<img> 태그에 대해 배웠다. 

 

<h1>HTML</h1>
Hypertext Markup Language (HTML) is the standard markup language for 
<strong>creating <u>web</u> pages</strong> and web applications.
Web browers receive HTML doucuments from a web server or from local storage and render them into multimedia web pages. 
HTML describes the structure of a web page semantically and originally included cues for the appearance of the document.

HTML elements are the building blocks of HTML pages. 
With HTML constructs, images and other objects, such as interactive forms, may be embedded into the rendered page. 
It provides a means to create structured documents by denoting structural semantics for text such as headings,
paragraphs, lists, links, quotes and other items, HTML elements are delineated by tags, written using angle brackets.

 

<h1>, <strong>, <u>를 사용하고 추가적으로 문장을 더 넣었다.

code에서는 줄바꿈을 했었는데 웹페이지에서는 적용되지 않았다 

 

 

  • <br> : 줄바꿈 태그

<h1>HTML</h1>
Hypertext Markup Language (HTML) is the standard markup language for 
<strong>creating <u>web</u> pages</strong> and web applications.
Web browers receive HTML doucuments from a web server or from local storage and render them into multimedia web pages. 
HTML describes the structure of a web page semantically and originally included cues for the appearance of the document.

<br><br>HTML elements are the building blocks of HTML pages. 
With HTML constructs, images and other objects, such as interactive forms, may be embedded into the rendered page. 
It provides a means to create structured documents by denoting structural semantics for text such as headings,
paragraphs, lists, links, quotes and other items, HTML elements are delineated by tags, written using angle brackets.

<br>을 사용하면 두번째 문단을 줄바꿈 할 수 있다

앞서 배웠던 태그들과 달리 <br>태그는 시각적인 의미만 가지고 있기에 </br>을 사용할 필요가 없다

 

 

  • <p> : 단락을 표현할 때 사용하는 태그

<h1>HTML</h1>
<p>Hypertext Markup Language (HTML) is the standard markup language for 
<strong>creating <u>web</u> pages</strong> and web applications.
Web browers receive HTML doucuments from a web server or from local storage and render them into multimedia web pages. 
HTML describes the structure of a web page semantically and originally included cues for the appearance of the document.

</p><p>HTML elements are the building blocks of HTML pages. 
With HTML constructs, images and other objects, such as interactive forms, may be embedded into the rendered page. 
It provides a means to create structured documents by denoting structural semantics for text such as headings,
paragraphs, lists, links, quotes and other items, HTML elements are delineated by tags, written using angle brackets.</p>

<p> </p> 쌍으로 존재

 

 

  • <img> : 원하는 이미지 주소를 적어 이미지를 추가하는 태그
<img src="coding.jpg" width="100%">

<img src ="이미지 주소"> 로 사용하면 된다

src : sorce의 줄임말, 이미지 크기 설정을 위해 width(넓이) = "100%"를 해줬다

 

이미지 출처 언스플래시

이미지를 삽입해봤다.