0

I'm new to HTML and I want to show this text(except those red underlines) on my HTML page, I have studied all of the HTML tags and wrote this code. but still, it's not like the text :( if anyone could, please help me fix it.

<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <h2>Brandning</h2>
  <p>
    <big>I build and activate brands through cultural insigh & strategic vision.</big>
  </p>
  <p>
    <big>See more products</big>
  </p>
  <footer>
    <p>© 2020 Cris. All rights reserved</p>
  </footer>
</body>

</html>

this a demo of text

2
  • 1
    Please note the big tag is obsolete and should not be used . Don't use HTML to style your document, that is the job of CSS (HTML does provide a foundation and play a part) Commented Oct 20, 2020 at 1:54
  • 1
    You could use the <pre></pre> tag for preformatted text, but HTML does not dictate style. Use CSS for that. You should know that one or more white spaces in HTML shows up as only a single white space. Whether the Browser takes that space off at the very begging of a tags textContent depends on the Browser. For this reason I actually do *{ font-size:0; } in CSS, then individually assign font-size more directly. You could indent like .indent{ margin-left:10px; } then just add class='indent' to your HTML tags. Just comments. Commented Oct 20, 2020 at 1:58

2 Answers 2

1

If you want to add styling to the text, you'll need to use CSS on top of HTML. We can do this by adding a css file or using in-line styling like so:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div style="margin-left:50px;">
    <h2>Brandning</h2>
    <p>
      <big>I build and activate brands through cultural insigh & strategic vision.</big>
    </p>
    <p>
      <big>See more products</big>
    </p>
  </div>
  <footer>
    <p>© 2020 Cris. All rights reserved</p>
  </footer>
</body>
</html>

We created a div container and set the left margin to 50px which gives the text the indent you want

Sign up to request clarification or add additional context in comments.

2 Comments

thanks, i fixed it. and how about that sticked together title and content? when i execute my code, they are not sticked and have some distance
You'll want to set the header margin to none <h2 style="margin:0px;">Brandning</h2>
0

If you want to use only html, you can cover the indented texts using <blockquote> tag as follows.

<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <blockquote>
    <h2>Brandning</h2>
    <p>
      <big>I build and activate brands through cultural insigh & strategic vision.</big>
    </p>
    <p>
      <big>See more products</big>
    </p>
  </blockquote>
  <footer>
    <p>© 2020 Cris. All rights reserved</p>
  </footer>
</body>

</html>

2 Comments

yes, i prefer use html for now, i tried it, thank u
Can you pls approve my answer if that's what you were looking for?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.