찾다

HTML5 태그

Sep 04, 2024 pm 04:36 PM
htmlhtml5HTML TutorialHTML PropertiesHTML tags

우리 모두는 HTML의 표준 약어인 HyperText Markup Language를 알고 있습니다. 따라서 HTML5는 최신 HTML 버전입니다. 제품이 개발되면; 분명히, 그 과정에서 많은 새로운 개발이 포함된 다양한 버전의 HTML이 있을 것입니다. 따라서 HTML5에는 새로운 속성과 동작이 있습니다. 이 HTML5 태그는 더 이상 프로그래밍 언어가 아니지만 마크업 언어입니다. 그렇다면 마크업 언어란 무엇인가? 문서에서 태그를 사용하여 요소 속성을 정의하는 것은 마크업 언어입니다. 이제 태그를 정의하고 웹페이지를 생성하는 방법을 자세히 알아보겠습니다.

HTML5 태그

태그는 콘텐츠를 표시하기 위한 사양입니다. 일반적으로 시작 태그와 끝 태그가 있습니다. 또한 와 같은 종료 태그가 필요하지 않은 태그도 거의 없습니다. 이는 줄이 바뀌어 다음 줄부터 해당 태그 옆에 데이터가 표시된다는 의미입니다. 이제 HTML5의 새로운 요소 중 일부를 살펴보겠습니다.

HTML5에서는 일반적으로 태그를 두 가지 카테고리로 나눌 수 있습니다.

  • 의미 요소: 이러한 요소에 대한 몇 가지 예는 다음과 같습니다.
    , ,
  • 비의미적 요소: 예는 다음과 같습니다.
    , 등등

    아래에서 설명하는 태그는 HTML5 버전에서만 새롭게 도입된 태그입니다. 모두 분류할 수 있는 다양한 유형의 태그입니다.

    1. 구조 태그

    다음은 구조 태그 유형과 예시입니다.

    아. 기사: head 태그와 유사하게 주로 사용되는 태그입니다. 주로 양식, 블로그, 뉴스 기사 및 모든 예시에서 사용됩니다.

    코드:

    <article> <h3 id="The-first-one">The first one </h3></article>
    
    <h2>Welcome Back
    
    </h2>

    출력:

    HTML5 태그

    ㄴ. 따로: 기사의 사이드바처럼 콘텐츠를 주변 콘텐츠와 연결하는 일반적인 태그와 유사한 것입니다. 그리고 이 태그는 IE 버전 8 이상을 사용할 때만 의미가 있습니다.

    ㄷ. 세부정보: 이 태그는 사용자에게 추가 데이터를 제공하는 데 사용됩니다. 이는 세부 정보를 숨기거나 표시할 수 있는 대화형 플랫폼일 수 있습니다. 요약 태그 아래에서 이 탭의 사용법을 확인할 수 있습니다.

    디. 헤더: 헤더 부분과 관련된 태그로 제목 정보가 포함되어 있습니다. 시작 태그와 끝 태그가 모두 있어야 합니다.

    코드:

    <header>
    <h1 id="Happy-Hours">Happy Hours</h1>
    <nav>
    <p><a href="#">Morning</a> | <a href="#">Afternoon</a> | <a href="#">Evening</a></p>
    </nav>
    </header>
    

    출력:

    HTML5 태그

    마. hgroup: 이 태그는 헤더 그룹을 설명하는 데 사용됩니다. 예시를 살펴보겠습니다.

    코드:

    
    <hgroup>
    <h1 id="Let-s-check-size-of-this-h">Let’s check size of this h1 </h1>
    <h2 id="Let-s-check-size-of-this-h"> Let’s check size of this h2 </h2>
    <h3 id="Let-s-check-size-of-this-h"> Let’s check size of this h3</h3>
    <h4 id="Let-s-check-size-of-this-h"> Let’s check size of this h4</h4>
    <h5 id="Let-s-check-size-of-this-h"> Let’s check size of this h5</h5>
    </hgroup>
    
    

    출력:

    HTML5 태그

    f. 바닥글: 이 태그는 페이지 마지막에 배치되는 태그입니다. 저작권, 역사 관련 정보, 데이터 등을 다룬다. 아래에서 작은 예를 살펴보겠습니다.

    코드:

    
    <footer>
    <nav>
    <p><a href="#">Copy Rights</a> | <a href="#">Come back soon</a></p>
    </nav>
    <p>Please subsribe for more learning content</p>
    </footer>
    
    

    출력:

    HTML5 태그

    지. nav: 이 태그는 탐색을 위한 모든 링크의 섹션을 제공하기 위한 것입니다.

    코드:

    
    <nav>
    <ul>
    <li><a href="https://www.educba.com/">EDUCBA Home</a></li>
    <li><a href="https://www.educba.com/about-us/">About EDUCBA</a></li>
    <li><a href="https://www.educba.com/courses/">Courses in EDUCBA</a></li>
    </ul>
    </nav>
    
    

    출력:

    HTML5 태그

    연습하면서 코드를 작성한 후 링크를 ​​클릭하여 확인해보세요.

    아. 섹션: 이름에서 알 수 있듯이 이 태그는 본문, 머리글, 바닥글 등과 같은 코드 부분을 정의합니다. 여기서는 시작 태그와 끝 태그가 모두 필요합니다. 아래에서 작은 예를 살펴보겠습니다.

    코드:

    <section>
    <h1 id="Welcome"> Welcome </h1>
    <h4 id="See-you-soon"> See you soon </h4>
    <p>Thank You.</p>
    </section>
    

    출력:

    HTML5 태그

    나. 요약: 이 태그는 세부정보 탭과 병행하여 사용됩니다. 세부정보 태그 아래에는 개념을 요약하는 요약 태그가 있습니다. 아래 예:

    코드:

    
    <details>
    <summary>How is this Summary tag defined?</summary>
    <p>By clicking the arrow beside the Summary question I got displayed</p>
    </details>
    <p> The data after the display tag is displayed like this.</p>
    
    

    출력:

    HTML5 태그

    이제 요약 태그 데이터를 확장하면 다음과 같은 결과가 나옵니다.

    HTML5 태그

    2. 양식 태그

    다음은 예시와 함께 아래에 설명된 다양한 유형의 양식 태그입니다.

    아. 데이터 목록: 이 태그는 사용자가 선택할 수 있도록 사전 정의된 값이 있는 드롭다운처럼 사용됩니다. 아래의 작은 예를 살펴보겠습니다.

    코드:

    
    <p>Enter your favorite browser name:</p>
    <input type="text" list="browsers">
    <datalist id="browsers">
    <option value="Firefox">
    </option>
    <option value="Chrome">
    </option>
    <option value="Internet Explorer">
    </option>
    <option value="Opera">
    </option>
    <option value="Safari">
    </option></datalist>
    
    

    출력:

    HTML5 태그

    마우스를 올리면 드롭다운이 나타납니다.

    HTML5 태그

    b. Keygen: This is for the encryption. It is for generating an encrypted key for passing the data in an encrypted format. Only the start tag is enough/required for this element, and the end tag is not mandatory.

    c. Meter: This tag would give us the measurement of the data which is present in a given range.

    Code:

    
    <meter value="25" min="0" max="100">25 out of 100</meter><p> This is 25 out of 100 </p><br>
    <meter value="0.7">70%</meter><p> This is the range for 70%</p>
    
    

    Output:

    HTML5 태그

    3. Formatting Tags

    Below are the types of formatting tag with examples:

    a. BDI: This is Bi-directional isolation. As the name already suggests, this tag can be used to isolate a part of the text and give it different styles from that of other text.

    b. Mark: This tag can help us highlight a specific text.

    Code:

    
    <p>This is how you can <mark>mark or highlight</mark> a text.</p>
    
    

    Output:

    HTML5 태그

    c. Output: As the name already shows us, it gives the result of any calculation.

    Code:

    
    
    =

    Output:

    HTML5 태그

    Make sure that you notice the form attribute of oninput. Once you input the attribute ‘x’ value, then the output gets displayed.

    d. Progress: This tag gives us the progress of a particular task.

    Code:

    
    <progress value="80" max="100"></progress><p> This progress bar is 80% completed</p>
    
    

    Output:

    HTML5 태그

    e. Rp: This is used when the ruby tags are not supported.

    f. Rt: It is used with the tag ruby. Mostly this is used in pronunciation in both Japanese and Chinese languages.

    g. Ruby: This tag is used with the rt and rp tags where the annotations with respect to the two languages, Chinese and Japanese, are pronounced.

    h. Wbr: This tag is for the word break. It is mainly used to check how a word breaks when the window size is resized.

    4. Embedded Content Tags

    Here are the types of embedded content tag explained below with examples:

    a. Audio: As the name already suggests, this tag would help us to incorporate audio files in the HTML document.

    b. Canvas: Defines a place on the web page where graphics or shapes, or graphs are present or can be defined. Here is an example.

    Code:

    
    <canvas id="run"></canvas>
    <script type="text/javascript">
    window.onload = function(){
    var can = document.getElementById("run");
    var context = can.getContext("2d");
    context.moveTo(30, 60);
    context.lineTo(150, 30);
    context.stroke();
    };
    </script>
    
    

    Output:

    HTML5 태그

    c. Dialog: This tag gives us a default box, especially if we wanted to have data in a box.

    Code:

    
    <p> Trying dialog here <dialog open>How does dialog box come up?</dialog> </p>
    
    

    Output:

    HTML5 태그

    d. Embed: This tag can be used for getting in any external file to the HTML file. We can have only the start tag, and the end tag is not mandatory here. There are different attributes that can be used with this tag, namely, width, height, src, and type.

    e. Figure and Figcaption: This, as already in its name, can incorporate the images and can give a caption to that image.

    f. Source: This tag can implement multiple audio and video files by providing the location of the files using this source tag.

    g. Time: This tag, as the name already notifies, is a tag for displaying the time. And note that this tag is not functional in the cases of internet explorer version 8 and below.

    h. Video: With the name of the tag, we can obviously get to know where this tag is used. For specifying the video files, we have this tag. Inside this Audio/Video tags, we define the source tags in specifying the files and their locations.

    Input Elements of HTML5 Tags

    Here are some input elements which we are using in HTML5 tags:

    1. Email: This is one of the input elements in HTML5. This element takes in only email addresses as the input.

    2. Number: This input element only accepts the number.

    3. Range: As the name already explains, this tag contains a range of numbers.

    4. URL: This input tag accepts the input field for the URL address. In this input type, we can only enter the URL.

    5. Placeholder: This is one of the attributes for the input type as text or text area or any number. This place holder value shows the value to be given as the input.

    Code:

    
    Enter Date of birth : <input type="text" name="dob" placeholder="dd/mm/yyyy">
    
    

    Output:

    HTML5 태그

    6. Autofocus: This attribute automatically focuses on a particular field where this element has been declared inside the input tag. This attribute is supported only by the latest versions of Chrome, Safari, and Mozilla only. The syntax is like this:

    <input type="“textarea”" name="”focus”" autofocus>
    Tag 
    : This tag represents a description of a definition. Tag : This tag deletes a specified text. Tag : This tag helps to display data in a scrolling manner. This texxt is in a scrolling manner

    Output:

    HTML5 태그

    7. : This is one of the basic tags that would help the browser understand the HTML version in which the program is being written. The declaration of this tag is to be written before the HTML tag.

    8. : This Meta tag describes the description of the HTML document. It contains the author’s name, date, and modifications, etc.

    In this HTML5, we even have an opportunity to get the GeoLocation of a device. There are different methods that can be helpful in making this location tagging easy. There are also different fonts and colors available in HTML5. Below are the few tags that are removed from the HTML usage from this HTML5 version.

    Acronym, Applet, big, dir, font, frameset, center, tt (TeleType text), basefont, center, strike, frame, u (underlined text), isindex, noframes, etc. Few attributes that are removed are below:

    Align, bgcolor, cellpadding, cellspacing, border, link, shape, charset, archive, codebase, scope, alink, vlink, link, background, border, clear, scrolling, size, width, etc.

    9. This tag is used to display the content where the use of JavaScript is disabled. Any content written inside this tag can be used in place of the content wherever javascript is used. As an exercise, can you try executing the different tags for which examples are not provided?

    Conclusion

    So, yes, there are the basic tags and references for HTML5. The initial version of HTML5 was released on 28th October 2014. We have seen different new tags that were introduced and had gone through a few attributes in HTML5. In the end, we had even covered that not only the introduction of new elements was done, but some elements and attributes that were present were restricted from use through this new release of HTML5.

    There were many attributes that were given with examples and some with only the data and the purpose of the attribute or elements. Try practicing all those different elements and attributes and keep learning.

위 내용은 HTML5 태그의 상세 내용입니다. 자세한 내용은 PHP 중국어 웹사이트의 기타 관련 기사를 참조하세요!

성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
HTML 코드를 어떻게 검증 할 수 있습니까?HTML 코드를 어떻게 검증 할 수 있습니까?Apr 24, 2025 am 12:04 AM

HTML 코드는 온라인 유효성 검사기, 통합 도구 및 자동화 된 프로세스를 통해 깨끗할 수 있습니다. 1) w3cmarkupvalidationservice를 사용하여 온라인으로 HTML 코드를 확인하십시오. 2) 실시간 확인을 위해 VisualStudioCode에 HTMLHINT 확장을 설치하고 구성하십시오. 3) htmltidy를 사용하여 시공 프로세스에서 HTML 파일을 자동으로 확인하고 청소하십시오.

HTML vs. CSS 및 JavaScript : 웹 기술 비교HTML vs. CSS 및 JavaScript : 웹 기술 비교Apr 23, 2025 am 12:05 AM

HTML, CSS 및 JavaScript는 최신 웹 페이지를 구축하기위한 핵심 기술입니다. 1. HTML 웹 페이지 구조를 정의합니다. 2. CSS는 웹 페이지의 모양을 담당합니다.

마크 업 언어로서의 HTML : 기능과 목적마크 업 언어로서의 HTML : 기능과 목적Apr 22, 2025 am 12:02 AM

HTML의 기능은 웹 페이지의 구조와 내용을 정의하는 것이며, 그 목적은 정보를 표시하는 표준화 된 방법을 제공하는 것입니다. 1) HTML은 타이틀 및 단락과 같은 태그 및 속성을 통해 웹 페이지의 다양한 부분을 구성합니다. 2) 콘텐츠 및 성능 분리를 지원하고 유지 보수 효율성을 향상시킵니다. 3) HTML은 확장 가능하므로 사용자 정의 태그가 SEO를 향상시킬 수 있습니다.

HTML, CSS 및 JavaScript의 미래 : 웹 개발 동향HTML, CSS 및 JavaScript의 미래 : 웹 개발 동향Apr 19, 2025 am 12:02 AM

HTML의 미래 트렌드는 의미론 및 웹 구성 요소이며 CSS의 미래 트렌드는 CSS-In-JS 및 CSShoudini이며, JavaScript의 미래 트렌드는 WebAssembly 및 서버리스입니다. 1. HTML 시맨틱은 접근성과 SEO 효과를 향상시키고 웹 구성 요소는 개발 효율성을 향상 시키지만 브라우저 호환성에주의를 기울여야합니다. 2. CSS-in-JS는 스타일 관리 유연성을 향상 시키지만 파일 크기를 증가시킬 수 있습니다. CSShoudini는 CSS 렌더링의 직접 작동을 허용합니다. 3. Webosembly는 브라우저 애플리케이션 성능을 최적화하지만 가파른 학습 곡선을 가지고 있으며 서버리스는 개발을 단순화하지만 콜드 스타트 ​​문제의 최적화가 필요합니다.

HTML : 구조, CSS : 스타일, 자바 스크립트 : 동작HTML : 구조, CSS : 스타일, 자바 스크립트 : 동작Apr 18, 2025 am 12:09 AM

웹 개발에서 HTML, CSS 및 JavaScript의 역할은 다음과 같습니다. 1. HTML은 웹 페이지 구조를 정의하고, 2. CSS는 웹 페이지 스타일을 제어하고 3. JavaScript는 동적 동작을 추가합니다. 그들은 함께 현대 웹 사이트의 프레임 워크, 미학 및 상호 작용을 구축합니다.

HTML의 미래 : 웹 디자인의 진화 및 트렌드HTML의 미래 : 웹 디자인의 진화 및 트렌드Apr 17, 2025 am 12:12 AM

HTML의 미래는 무한한 가능성으로 가득합니다. 1) 새로운 기능과 표준에는 더 많은 의미 론적 태그와 WebComponents의 인기가 포함됩니다. 2) 웹 디자인 트렌드는 반응적이고 접근 가능한 디자인을 향해 계속 발전 할 것입니다. 3) 성능 최적화는 반응 형 이미지 로딩 및 게으른로드 기술을 통해 사용자 경험을 향상시킬 것입니다.

HTML vs. CSS vs. JavaScript : 비교 개요HTML vs. CSS vs. JavaScript : 비교 개요Apr 16, 2025 am 12:04 AM

웹 개발에서 HTML, CSS 및 JavaScript의 역할은 다음과 같습니다. HTML은 컨텐츠 구조를 담당하고 CSS는 스타일을 담당하며 JavaScript는 동적 동작을 담당합니다. 1. HTML은 태그를 통해 웹 페이지 구조와 컨텐츠를 정의하여 의미를 보장합니다. 2. CSS는 선택기와 속성을 통해 웹 페이지 스타일을 제어하여 아름답고 읽기 쉽게 만듭니다. 3. JavaScript는 스크립트를 통해 웹 페이지 동작을 제어하여 동적 및 대화식 기능을 달성합니다.

HTML : 프로그래밍 언어입니까 아니면 다른 것입니까?HTML : 프로그래밍 언어입니까 아니면 다른 것입니까?Apr 15, 2025 am 12:13 AM

Htmlisnotaprogramminglanguage; itisamarkuplanguage.1) htmlstructuresandformatswebcontentusingtags.2) itworksporstylingandjavaScriptOfforIncincivity, WebDevelopment 향상.

See all articles

핫 AI 도구

Undresser.AI Undress

Undresser.AI Undress

사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover

AI Clothes Remover

사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool

Undress AI Tool

무료로 이미지를 벗다

Clothoff.io

Clothoff.io

AI 옷 제거제

Video Face Swap

Video Face Swap

완전히 무료인 AI 얼굴 교환 도구를 사용하여 모든 비디오의 얼굴을 쉽게 바꾸세요!

뜨거운 도구

맨티스BT

맨티스BT

Mantis는 제품 결함 추적을 돕기 위해 설계된 배포하기 쉬운 웹 기반 결함 추적 도구입니다. PHP, MySQL 및 웹 서버가 필요합니다. 데모 및 호스팅 서비스를 확인해 보세요.

에디트플러스 중국어 크랙 버전

에디트플러스 중국어 크랙 버전

작은 크기, 구문 강조, 코드 프롬프트 기능을 지원하지 않음

ZendStudio 13.5.1 맥

ZendStudio 13.5.1 맥

강력한 PHP 통합 개발 환경

안전한 시험 브라우저

안전한 시험 브라우저

안전한 시험 브라우저는 온라인 시험을 안전하게 치르기 위한 보안 브라우저 환경입니다. 이 소프트웨어는 모든 컴퓨터를 안전한 워크스테이션으로 바꿔줍니다. 이는 모든 유틸리티에 대한 액세스를 제어하고 학생들이 승인되지 않은 리소스를 사용하는 것을 방지합니다.

SublimeText3 Mac 버전

SublimeText3 Mac 버전

신 수준의 코드 편집 소프트웨어(SublimeText3)