logo

Hoe schrijf je HTML?

HTML is een acroniem van HyperText-opmaaktaal . Het wordt gebruikt voor het maken van webpagina's en webapplicaties. HTML is een veelgebruikte taal op internet. In dit artikel leren we hoe we HTML kunnen schrijven.

Hier laten we eerst een stapsgewijze procedure zien voor het maken van een HTML-pagina.

Stap 1 - Open een teksteditor om code te schrijven.

Hoewel er verschillende teksteditors zijn die eenvoudig kunnen worden gedownload voor een beginner, is de beste teksteditor Kladblok (in Windows) en Teksteditor (in Mac). In Windows is de standaardteksteditor Kladblok , terwijl op Mac de standaardeditor Teksteditor is. In ramen kunnen we de Kladblok editor door op Start te klikken en Kladblok te typen, zoals weergegeven in de onderstaande schermafbeelding -

Hoe HTML te schrijven

Wij kunnen ook gebruik maken van de Kladblok++ teksteditor in Windows om de HTML-programma's te schrijven. Nadat we de basis hebben geleerd, kunnen we andere professionele editors gebruiken, zoals Kladblok++, Sublieme Tekst, Vim, enz.

Stap 2 - Begin nu met het schrijven van HTML-programma's in de teksteditor. De HTML-tags zijn ingesloten tussen open tags () en gesloten tags (). Stel dat we een alinea moeten maken, dus in HTML wordt de alinea gemaakt door de tag open paragraaf te typen

en vervolgens een gesloten alineatag invoeren

.

Hoe HTML te schrijven

Nadat u een regel code hebt geschreven, kunt u eenvoudigweg op drukken Binnenkomen om naar de volgende regel te gaan.

Stap 3: Sla het bestand op met .html of met .htm extensie, zoals weergegeven in de onderstaande schermafbeelding.

Hoe HTML te schrijven

Stap 4: Nu kunt u uw .html-bestand uitvoeren. Om dit te doen, moet u naar de locatie gaan waar u uw bestand heeft opgeslagen. Selecteer vervolgens het bijbehorende bestand, klik er met de rechtermuisknop op en selecteer de gewenste webbrowser om het bestand uit te voeren. Het kan duidelijk zijn met de volgende schermafbeelding -

Hoe HTML te schrijven

Nadat u op de browser hebt geklikt, wordt een webpagina weergegeven met de uitvoer van uw bestand.

Laten we nu eens kijken hoe we met HTML kunnen beginnen of hoe we HTML-programma's kunnen schrijven.

Voor elk HTML-document kunnen we in principe het document beginnen met het documenttype, d.w.z. de label , een label, en een label . We zouden de tags moeten sluiten En labels. Het zal als volgt worden geschreven -

 

In de tag kunnen we onze code schrijven die in de webbrowser wordt weergegeven. Om de titel van de webpagina te maken, kunnen we de head-tag opnemen, zoals hieronder weergegeven:

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