logo

Com escriure HTML?

HTML és un acrònim de Llenguatge de marcat d'hipertext . S'utilitza per crear pàgines web i aplicacions web. HTML és un llenguatge molt utilitzat a la xarxa. En aquest article, aprendrem a escriure HTML.

Aquí, primer, estem mostrant un procediment pas a pas per crear una pàgina HTML.

Pas 1 - Obriu un editor de text per escriure codi.

Tot i que hi ha diversos editors de text que es poden descarregar fàcilment per a un principiant, el millor editor de text és Bloc de notes (a Windows) i TextEdit (a Mac). A Windows, l'editor de text predeterminat és Bloc de notes , mentre que a Mac, l'editor predeterminat és TextEdit. A les finestres, podem obrir el Bloc de notes editor fent clic a l'inici i escriviu el bloc de notes, tal com es mostra a la captura de pantalla següent:

Com escriure HTML

També podem utilitzar el Bloc de notes ++ editor de text a Windows per escriure els programes HTML. Després d'aprendre els conceptes bàsics, podem utilitzar altres editors professionals com Bloc de notes ++, Text sublim, Vim, etc.

Pas 2 - Ara, comenceu a escriure programes HTML a l'editor de text. Les etiquetes HTML es troben dins d'etiquetes obertes () i etiquetes tancades (). Suposem que hem de crear un paràgraf, de manera que en HTML , el paràgraf es crea escrivint l'etiqueta de paràgraf obert

i després introduint una etiqueta de paràgraf tancat

.

Com escriure HTML

Després d'escriure una línia de codi, simplement podeu prémer Entra per anar a la línia següent.

Pas 3: Deseu el fitxer amb .html o amb .htm extensió, tal com es mostra a la captura de pantalla següent.

Com escriure HTML

Pas 4: Ara, podeu executar el vostre fitxer .html. Per fer-ho, heu d'anar a la ubicació on heu desat el fitxer. A continuació, seleccioneu el fitxer corresponent i feu-hi clic amb el botó dret i seleccioneu el navegador web desitjat per executar el fitxer. Pot quedar clar amb la següent captura de pantalla:

recorregut per correu de l'arbre binari
Com escriure HTML

Després de fer clic al navegador, es mostrarà una pàgina web amb la sortida del fitxer.

Ara, anem a veure com podem començar amb HTML o com escriure programes HTML.

Per a qualsevol document HTML, bàsicament podem iniciar el document amb el tipus de document, és a dir, el etiqueta , un etiqueta, i a etiqueta . Hauríem de tancar les etiquetes i etiquetes. S'escriurà de la següent manera:

 

A l'etiqueta podem escriure el nostre codi que es mostrarà al navegador web. Per crear el títol de la pàgina web, podem incloure l'etiqueta head tal com es mostra a continuació:

 <title < pre> <p>There are various tags in HTML for performing different tasks. There are six headings in HTML that are <a href="/html-heading"> <strong><h1>, <h2>, <h3>, <h4>, <h5>, and <h6></h6></h5></h4></h3></h2></h1></strong> </a> . These headings should be closed with their corresponding closing tags.</p> <p>There are various properties and rules to write HTML code. For more information, you can visit our <strong>HTML tutorial</strong> .</p> <p>We can create paragraphs in HTML by using the </p><p> tag , to create a hyperlink we can use the anchor tag, i.e.,  <a href=" ">  </a>, we can also add unordered and ordered lists by adding <ul> and <ol> tags . An image can be inserted by using the .</ol></ul></p> <p>To add the style to a specific html tag or to the group of the html tags, we can use the CSS. There are three ways to use CSS in HTML that are Inline CSS , Internal or embedded CSS, and using the External CSS . Let&apos;s see the brief description of these ways -</p> <p> <strong>Inline CSS -</strong> Inline CSS uses style attribute to style the HTML elements. It is used to apply style to a single element.</p> <p> <strong>Internal or Embedded CSS -</strong> It defines CSS using  <strong></strong> tag in the section. To use internal CSS, we can use id and class attributes.</p> <p> <strong>External CSS -</strong> It defines all CSS properties in a separate .css file. Then we have to include that file using the tag in the  section.</p> <p>So, for more information, one should visit our HTML tutorial, where you will find a detailed and easier description of <a href="/html-tags">HTML tags</a> .</p> <hr></title>