ReasonJun

HTML : tags / grammer (block tags) 본문

Frontend/HTML

HTML : tags / grammer (block tags)

ReasonJun 2023. 6. 5. 15:31
728x90

DIV

The <div> element is a versatile container that is often used for grouping and structuring content. It has no inherent meaning and is primarily used for styling purposes or as a container for other elements.

 

<div>Hello</div> 
<div>World</div> 
=> Stack vertically.
=> has the largest size.

<div><div></div></div> => possible
<div><span></span></div> => possible

<div style="width: 100px;">Hello</div> 
<div style="height: 40px;">World</div> 

 

<div style="margin: 10px 10px;">Hello</div> 
<div style="padding: 10px 10px;">World</div> 

 

p

The <p> element represents a paragraph of text. It is used to structure and separate blocks of textual content.

 

h1 ~ h6

These elements represent headings of different levels, with <h1> being the highest and <h6> the lowest. Headings are used to give structure and hierarchy to the content.

 

ul ~ ol

These elements are used for creating unordered and ordered lists, respectively. <ul> represents a bulleted list, while <ol> represents a numbered list. Each list item is contained within <li> tags.

 

 

blockquote

The <blockquote> element is used to represent a block of quoted text, typically with indentation or a distinct formatting style.

 

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/blockquote

 

<blockquote>: The Block Quotation element - HTML: HyperText Markup Language | MDN

The <blockquote> HTML element indicates that the enclosed text is an extended quotation. Usually, this is rendered visually by indentation (see Notes for how to change it). A URL for the source of the quotation may be given using the cite attribute, while

developer.mozilla.org

pre

The <pre> element is used to preserve whitespace and present text exactly as it is written, including line breaks and spaces. It is often used for displaying code snippets or preserving formatting in preformatted text.

 

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/pre

 

<pre>: The Preformatted Text element - HTML: HyperText Markup Language | MDN

The <pre> HTML element represents preformatted text which is to be presented exactly as written in the HTML file. The text is typically rendered using a non-proportional, or monospaced, font. Whitespace inside this element is displayed as written.

developer.mozilla.org

 

section

The <section> element represents a standalone section of content within a webpage. It is typically used to group related content together.

 

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/section

 

article

The <article> element represents a self-contained composition or article that can be independently distributed or syndicated. It is commonly used for blog posts, news articles, and similar content.

 

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/article

 

<article>: The Article Contents element - HTML: HyperText Markup Language | MDN

The <article> HTML element represents a self-contained composition in a document, page, application, or site, which is intended to be independently distributable or reusable (e.g., in syndication). Examples include: a forum post, a magazine or newspaper ar

developer.mozilla.org

 

header / footer

These elements are used to define the header and footer sections of a webpage, respectively. The <header> typically contains introductory content or site branding, while the <footer> contains information such as copyright notices, contact information, or navigation links.

728x90
Comments