/    Sign up×
Community /Pin to ProfileBookmark

How To Do Pure Html 5 Text Style, Size & Layout ? No Css

Hi,

Recently, I tried learning text size, text styling and text colouring in html 5.
But cannot find any tutorial that shows html 5 but css instead. Like these:

CODE 1

[code]
Style Attribute<br>
Format = <tagname style=”property:value;”><br>
1: Heading Background Colour, Paragraph Background Colour.<br>
<body style=”background-color:powderblue;”>
<h1 style=”background-color:blue;”>Heading background colour is blue.</h1>
<p style=”background-color:red;”>1. Paragraph background colour is red.</p>
<p style=”background-color:tomato;”>2. Paragraph background colour is tomato.</p>
<br>
<br>
2: Heading Font, Paragraph Font.<br>
<h1 style=”font-family:verdana;”>1. Heading Font is: Verdana.</p>
<p style=”font-family:courier;”>2. Paragraph Font is: Courier.</p>
<br>
<br>
3: Heading & Paragraph Font Size, Heading & Paragraph Font Colour.<br>
<h1 style=”font-size:100px;”>2. Heading Text Size 100px</h1>
<p style=”font-size:50px;”>2. Paragraph Text Size 50px</p>
<br>
<h1 style=”font-size:200%;”>3. Heading Text Size 200%</h1>
<p style=”font-size:100%;”>3. Paragraph Text Size 100%</p>
<br>
<h1 style=”color:red;”>1. Heading Text Colour Red</h1>
<p style=”color:blue;”>1. Paragraph Text Colour Blue</p>
<br>
<br>
4. Heading & Paragraph Text-Align.<br>
<h1 style=”text-align:center;”>1. Heading Text Align: Center</h1>
<p style=”text-align:center;”>2. Paragraph Text Align: Center</p>
<p style=”text-align:left;”>3. Paragraph Text Align: Left</p>
<p style=”text-align:right;”>4. Paragraph Text Align: Right</p>
<br>
<br>
<p>A <b>bold</b> text.</p>
<p>A <strong>strong</strong> text.</p>
<p>An <i>italic</i> text.</p>
<p>An <em>emphasised</em> text.</p>
<p>A <mark>marked</mark> text.</p>
<p>A <del>deleted</del> <ins>inserted</ins> text.</p>
<p>A <small>small</small> text.</p>
<p>A <sub>subscript</sub> text.</p>
<p>A <sup>superscript</sup> text.</p>
<br>
<br>
[/code]

I am really curious to learn html 5 text size, text styling, text colouring.
Can someone show me some examples ?
back in 1998, we had something like these, which I believe no longer are supported as they are not html 5:

[code]

<p align=”left”><font size=”2″>This is paragraph 2</font><br>
<font color=”red”>Line 2</font><br>
Line 3<br>
</p>

[/code]

Sometimes, on some browsers, even this worked. Note the closing tags:

Code 2

[code]
<p align=”left”><font size=”2″>This is paragraph 2</size><br>
<font color=”red”>Line 2</red><br>
Line 3<br>
</left>

[/code]

I think “&nbsp” was used for space.

I think I learnt a handful of years back, the new html, can’t remember which version, and it went something like this …

Code 3

[code]
<text-align=”left”><text-size=”2″><text-style=”Times New Roman”>This is paragraph 2</text></text></text><br>
<text-color=”red”>Line 2</text-color><br>
Line 3<br>
</p>
[/code]

Can you confirm this was so ? Meaning, my final code (Code 3) above was valid html ? If so, which version ?
And my Code 1, it’s html 5 or Css ?
It does not look like css but tutorials say css. I am confused. They say they gonna now teach html 5 but then go on about how to do it in css and then show samples like my Code 1 above. Hence, I am confused. Is Code 1 html 5 or css ? That’s my big question.

to post a comment

4 Comments(s)

Copy linkTweet thisAlerts:
@sibertJun 25.2022 — > @novice2022#1644910 But cannot find any tutorial that shows html 5 but css instead.

Inline CSS: &lt;h1 style="background-color:blue;"

External CSS:
``<i>
</i>h1 {
background-color: blue;
}<i>
</i>
``

There is no or minimal "styling" possible without CSS. Inline or External.

Avoid Inline CSS! Using external CSS, you have to edit h1 ONCE for the entire web site. In a single place.

Using Inline CSS you have to edit hundreds of h1 tags.
Copy linkTweet thisAlerts:
@SempervivumJun 25.2022 — @novice2022#1644910

Seems to me that the term HTML5 needs clarification.
>Recently, I tried learning text size, text styling and text colouring in html 5.

All of this was supported before HTML5 was introduced, including styling text by CSS, inline or in an external file. It's not subject of HTML5.

HTML5 introduced features like (e. g.) video and audio tag for displaying multimedia content, semantic tags like header, main, footer, nav, the figure tag including figcaption, the canvas element, ... (don't beat me, there are more).
Copy linkTweet thisAlerts:
@novice2022authorJun 28.2022 — @sibert#1644916

Aah! I now understand why inline css is stressful.

However, I am trying to build a one page site. That means, I got to use inline css.

Maybe, I just build a referencer. A variable by adding inline css and just reference it on the required lines. Then, when I need to change things, I just change the value of the variable (change css code). Then, no need to change hundreds of lines. Yes ?
Copy linkTweet thisAlerts:
@sibertJun 28.2022 — > @novice2022#1645033 However, I am trying to build a one page site. That means, I got to use inline css.

Why? Does not matter if multi page or single page. The number of inline-CSS is that matter. All development ought to be DRY. Don't-Repeat-Yourself.

``<i>
</i>&lt;h1 style="background-color:blue;&gt;
&lt;h1 style="background-color:blue;&gt;
&lt;h1 style="background-color:blue;&gt;
&lt;h1 style="background-color:blue;&gt;<i>
</i>
`</CODE>

And using multi color website is IMO a bad UX (last century sort of). Or reduces the accessibility a lot. But this is a personal opinion.

OR

Just plain<C>
<h1></C> and ONE SINGLE <C>h1 {background-color: blue;}` for ALL h1

> Maybe, I just build a referencer. A variable by adding inline css and just reference it on the required lines. Then, when I need to change things, I just change the value of the variable (change css code). Then, no need to change hundreds of lines. Yes ?

I recommend and are using variables. This is more DRY. https://static.go4webdev.org/drycss
×

Success!

Help @novice2022 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 4.26,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...