AgerNic.com
WEB DEVELOPER SITE, HTML, CSS, PHP, SQL

How to code in HTML


<< Previous Page
HTML tutorial
Next Page >>
HTML tutorial

HTML Tutorial » How to code in HTML

When you search in a search engine "html code" depends on what you mean: the <code> tag or the tags in HTML how to create a web page.
In order to avoid confusion we will refer to both cases

Syntax for <code>:

<code> content here....</code>

Syntax for HTMLtags code:

<tag_name> content here....</tag_name>

 

HTML <code> For Computer Code

The HTML <code> tag is used to define a piece of computer code and
the content between <code> and </code> is displayed in the browser's default monospace font.

Example 1
  <!DOCTYPE html>
<html>
<head>
<title>HTML &lt;code&gt; for computer code - example</title>

</head>
<body>
<h2>HTML &lt;code&gt; for computer code - example</h2>
<code>
a = 8;
b = 11;
c = b - a;
</code> <!-- end code -->
</body>
</html>

In this case the program will display the result on a line.
To fix this, you have to put the <code> element between " <pre> and </pre> tag:

Example 2
  <!DOCTYPE html>
<html>
<head>
<title>HTML &lt;code&gt; for computer code - example</title>

</head>
<body>
<h2>HTML &lt;code&gt; for computer code - example</h2>
<pre>
<code>
a = 8;
b = 11;
c = b - a;
</code> <!-- end code -->
</pre>
</body>
</html>
Note: <pre> tag is used to display code snippets because it always keeps the text formatting as it.

 

Related subjects:
Text align Text size Text color

 

Simple HTML code list

HTML basics tags every non-developer should know

Example
        headings <br />
<h2> your title content here </h2><br />
paragraphs <br />
<p> text here </p> <br />
Links <br />
<a href="https://www.agernic.com">online tutorials</a> <br />
Images <br />
<img src="https://www.agernic.com/templates/mariwel.jpg"> <br />
Bold and strong <br />
<strong>this text is bold or strong </strong> <br />
Ordered lists <br />
<ol>
<li> this is first item</li>
<li> this is second item</li>
<li> this is third item</li>
</ol>

Tags: simple html code example, symbol html code, code list, generator, color, online, html code for website

 

People also ask code online

What is the basic code of HTML?
How do I start HTML code?
What is HTML and its code?
How do I write HTML code?
What is the basic code of HTML?
How do I start HTML code?
What is HTML and its code?
How do I write HTML code?
Is HTML a web language?
How do I build a website?
How can I learn HTML code for free?
How do I run HTML code in Chrome?
How can I write HTML code in mobile?
What is code example?
How do I code a website?
How do I master HTML?
Can I create a website for free?
What websites use HTML?
How can I create my own website on Google?



simple html code example, symbol html code, code list, generator, color, online, html code for website
How to code in HTML - html tutorial

Online Editor
ONLINE EDITOR

news templates


COLOR PICKER

news templates
This tool makes it easy to create, adjust, and experiment with custom colors for the web.


HTML Templates
news templates
Magnews2 is a modern and creative free magazine and news website template that will help you kick off your online project in style.


CSS HTML Layout
news templates
Find here examples of creative and unique website layouts.


Free CSS HTML Menu
news templates
Find here examples of creative and unique website CSS HTML menu.


HTML Img Background
HTML Image Link
HTML Image Size
HTML Text Style
HTML Text Align
HTML Text Size
HTML Text Color Style
HTML Text Color
HTML Table Color
HTML Table Row Colspan
HTML Table Width
HTML Table Style
HTML Table Border
HTML Table
HTML Font Face
HTML Font Size
HTML Font Color
HTML Headings
HTML div border color
HTML div class
HTML class container
HTML form action
HTML comment
HTML link new tab
HTML link underline
HTML link tag
HTML button action
HTML button onclick
HTML button link
HTML table style
HTML image
HTML colors
HTML div style
Text, paragraf in HTML
HTML Tags Attributes
HTML - Elements
HTML Introduction
Home HTML Tutorial
Online Editor
ONLINE EDITOR

news templates


COLOR PICKER

news templates
This tool makes it easy to create, adjust, and experiment with custom colors for the web.


HTML Templates
news templates
Magnews2 is a modern and creative free magazine and news website template that will help you kick off your online project in style.


CSS HTML Layout
news templates
Find here examples of creative and unique website layouts.


Free CSS HTML Menu
news templates
Find here examples of creative and unique website CSS HTML menu.


jQuery replace...
jQuery replaceClass...
jQuery click ()...
jQuery switchClass()...
jQuery draggable()...
jQuery HTML...
jQuery scroll smooth...
jQuery scroll()...
jQuery stop()...
jQuery animate()...
jQuery SlideToggle()...
jQuery slideDown()...
jQuery slideUp()...
jQuery fadeToggle...
jQuery fadeOut()...
jQuery fadeIn()...
jQuery Effects - hide () and show ()...
jQuery Events...
jQuery Attributes...
jQuery Selectors...