logo

¿Cómo escribir HTML?

HTML es un acrónimo de Lenguaje de marcado de hipertexto . Se utiliza para crear páginas web y aplicaciones web. HTML es un lenguaje ampliamente utilizado en la web. En este artículo, aprenderemos a escribir HTML.

comentario css

Aquí, primero, mostramos un procedimiento paso a paso para crear una página HTML.

Paso 1 - Abra un editor de texto para escribir código.

Aunque existen varios editores de texto que un principiante puede descargar fácilmente, el mejor editor de texto es el Bloc de notas (en Windows) y TextEdit (en Mac). En Windows, el editor de texto predeterminado es Bloc , mientras que en Mac, el editor predeterminado es TextEdit. En Windows podemos abrir el Bloc editor haciendo clic en Inicio y escriba Bloc de notas, como se muestra en la siguiente captura de pantalla:

Cómo escribir HTML

También podemos utilizar el Bloc de notas++ Editor de texto en Windows para escribir los programas HTML. Después de aprender los conceptos básicos, podemos utilizar otros editores profesionales como Bloc de notas++, Texto sublime, Vim, etc.

Paso 2 - Ahora, empieza a escribir programas HTML en el editor de texto. Las etiquetas HTML están encerradas entre etiquetas abiertas () y etiquetas cerradas (). Supongamos que tenemos que crear un párrafo, por lo que en HTML, el párrafo se crea escribiendo la etiqueta de párrafo abierto.

y luego ingresando una etiqueta de párrafo cerrado

.

Cómo escribir HTML

Después de escribir una línea de código, simplemente puede presionar Ingresar para pasar a la siguiente línea.

Paso 3: Guarde el archivo con .html o con .htm extensión, como se muestra en la siguiente captura de pantalla.

Cómo escribir HTML

Etapa 4: Ahora puede ejecutar su archivo .html. Para hacer esto, debe ir a la ubicación donde guardó su archivo. Luego seleccione el archivo correspondiente, haga clic derecho sobre él y seleccione el navegador web deseado para ejecutar el archivo. Puede quedar claro con la siguiente captura de pantalla:

Cómo escribir HTML

Después de hacer clic en el navegador, se mostrará una página web que muestra el resultado de su archivo.

Ahora, veamos cómo podemos comenzar con HTML o cómo escribir programas HTML.

Para cualquier documento HTML, básicamente podemos comenzar el documento con el tipo de documento, es decir, el etiqueta , un etiqueta y un etiqueta . Deberíamos tener que cerrar las etiquetas y etiquetas. Se escribirá de la siguiente manera:

 

En la etiqueta podemos escribir nuestro código que se mostrará en el navegador web. Para crear el título de la página web, podemos incluir la etiqueta principal como se muestra a continuación:

 <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>