Login | Register | FAQ
Anonymous

using notepad

+ Post a reply

7 posts Page 1 of 1


using notepad

by PatoKirui » Sat Jul 28, 2012 7:27 pm

I have learn how to use notepad to write html pages. But i have a big problem using it to display html elements on a browser.
I want to use notepad to display for example these tags
<html>
<head>
<title> using notepad</title>
</head>
<body>
<p>notepad is the simplest...</p>
<ul>
<li>safari</li>
<li> firefox</li>
</ul>
</body>
</html>
so that a user can see the above elements as text.
Please can someone help on how to use notepad to display it or if not possible, suggest for me the ultimate web editor that can solve this problem with ease.
Thanks
patokirui
User avatar

PatoKirui

  • Posts: 49
  • Joined: Sun Jun 03, 2012 12:24 pm
  • Location: Eldoret, Rift Valley, Kenya.

Re: using notepad

by atik » Sat Jul 28, 2012 8:18 pm

PatoKirui wrote:I have learn how to use notepad to write html pages. But i have a big problem using it to display html elements on a browser.
I want to use notepad to display for example these tags
<html>
<head>
<title> using notepad</title>
</head>
<body>
<p>notepad is the simplest...</p>
<ul>
<li>safari</li>
<li> firefox</li>
</ul>
</body>
</html>
so that a user can see the above elements as text.
Please can someone help on how to use notepad to display it or if not possible, suggest for me the ultimate web editor that can solve this problem with ease.
Thanks
patokirui

What you need to use is called html entities for the tags. Normally when you put tags, they are interpreted by browsers, so when you actually want to show them as raw element, you need to use corresponding entities. For example , html tag is represented as below -
Code: Select all
&lt;html&gt;


Refer to this article for some commonly used entities.
http://www.w3schools.com/html/html_entities.asp
User avatar

atik

  • Posts: 472
  • Joined: Mon Oct 17, 2011 4:55 pm

Re: using notepad

by PatoKirui » Sun Jul 29, 2012 7:44 am

Now i understand how to use notepad to show html tags.
To represent any html element as basic text we only need to use html entities so as to be displayed by browsers as text(which are actualy html tags) .
Example:
to display a tag like <html> we represent it with an entity for less-than(<) as &lt then we write html as it is, and finaly we write &gt for greater-than(>).
By doing so, the browser will interprates them as text which will be:-
<html>
but not a code anymore because we use html entities to display them.

Thanks alot.
User avatar

PatoKirui

  • Posts: 49
  • Joined: Sun Jun 03, 2012 12:24 pm
  • Location: Eldoret, Rift Valley, Kenya.
--
Join our HTML/CSS... Webmaster Forums
•Greatness isn't given, it is achieved.

Re: using notepad

by atik » Sun Jul 29, 2012 7:47 am

PatoKirui wrote:Now i understand how to use notepad to show html tags.
To represent any html element as basic text we only need to use html entities so as to be displayed by browsers as text(which are actualy html tags) .
Example:
to display a tag like <html> we represent it with an entity for less-than(<) as &lt then we write html as it is, and finaly we write &gt for greater-than(>).
By doing so, the browser will interprates them as text which will be:-
<html>
but not a code anymore because we use html entities to display them.

Thanks alot.

You are absolutely right. Using html entities is just a way to say the browser i want the actual tag printed on screen, don't want to use that as a markup.
User avatar

atik

  • Posts: 472
  • Joined: Mon Oct 17, 2011 4:55 pm

Re: using notepad

by PatoKirui » Wed May 15, 2013 8:17 pm

Thanks atik
User avatar

PatoKirui

  • Posts: 49
  • Joined: Sun Jun 03, 2012 12:24 pm
  • Location: Eldoret, Rift Valley, Kenya.
--
Join our HTML/CSS... Webmaster Forums
•Greatness isn't given, it is achieved.

Re: using notepad

by PatoKirui » Thu May 16, 2013 8:52 pm

Its true cubesquare. It happened that i was reviewing the great tutorial of html that i came across this question of old...the time i was strugling learning html from this site. Surely some small questions like this can actualy take us by far, reflecting how i were at those times...but iam wondering why Html.net did not have a regard to add this importand entities in their html tutorial!
Anyway i had realy understood it at the time atik refer me to w3schools.com to learn it(entities).
User avatar

PatoKirui

  • Posts: 49
  • Joined: Sun Jun 03, 2012 12:24 pm
  • Location: Eldoret, Rift Valley, Kenya.
--
Join our HTML/CSS... Webmaster Forums
•Greatness isn't given, it is achieved.

Re: using notepad

by PatoKirui » Mon Jun 03, 2013 7:42 pm

CubeSquare wrote:Hello PatoKirui,

HTML character entities are a bit of a handful to explain, and not for beginners. Even Atik left it to W3Schools to explain with part explanation and part visualization.
.
.
.
.
.
.
I have a different opinion from you, that it shouldn't be taught (it's really an advanced topic) but that doesn't mean that it's right. It's just my opinion. Your bright. Could you write the lesson?


[end of quote]

I had never imagined that way cubsquare but you said its an advanced topic! How? As for me i would have suggested to be included in something like a lookup table of all ASCII characters that are called entities in Html(those that are used in webdesgning). If not all of this, then the most commonly used entities should even be enought if you are talking for a bigginner just like as i was eager to know at those time when i was a bigginer!
To your question, its yes i can write it with all my enthusiasm. Why? Because its my hobby and also iam preparing myself to creating webdesing tutorials.
To an extend, i can support you that html.net was meant for bigginers and in their html lessons, when dealing with an example, say 'creating my first website page', then you gave those basic html tags that can make a page beginning from <doctype html>
.
.
.
.
</html>
now as a bigginer, and i want to give the same example with the same formatt(including entities), then what will happen since i haven't learn that there are sth called entities? Obviously I would not see the entities i wanted to be visible in my page if i just copy and past it in my notepad.
I encourage that html.net should consider this.
[its my own suggestion]


Thanks cubesquare
User avatar

PatoKirui

  • Posts: 49
  • Joined: Sun Jun 03, 2012 12:24 pm
  • Location: Eldoret, Rift Valley, Kenya.


+ Post a reply

Page 1 of 1

?>