Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7609551
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T01:11:57+00:00 2026-05-31T01:11:57+00:00

I have some HTML and CSS code like below <html> <head> <style type=text/css> img.normal

  • 0

I have some HTML and CSS code like below

<html>
<head>
<style type="text/css">
img.normal
{
height:auto;
}
img.big
{
height:120px;
}
p.ex
{
height:100px;
width:100px;
}
</style>
</head>

<body>
<img class="normal" src="logocss.gif" width="95" height="84" /><br />
<img class="big" src="logocss.gif" width="95" height="84" />
<p class="ex">The height and width of this paragraph is 100px.</p>
<p>This is some text in a paragraph. This is some text in a paragraph.
This is some text in a paragraph. This is some text in a paragraph.
This is some text in a paragraph. This is some text in a paragraph.</p>
</body>
</html>

I remember that the priority of the three style is inline > internal > external. But the code above, the picture which class named ‘big’, an inline style set its heigh as 84px and its width as 95, why the internal style can affect the result style? Any one can help?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T01:11:58+00:00Added an answer on May 31, 2026 at 1:11 am
    <img class="big" src="logocss.gif" width="95" height="84" />
    

    In the above, width and height are not style rules, they are attributes of the element (which CSS is supposed to replace). I would have guessed that attributes overwrote style rules, but maybe it’s the other way around. Either way, the basic answer to your question is that those aren’t inline style, so you’re understanding of priority is still correct. Try the following:

    <img class="big" src="logocss.gif" style="width:95px; height:84px;" />
    

    and see what gets applied.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have HTML + CSS text. I need some lib with simple function like
I have some code in HTML and CSS where HTML looks like this: <div
So I have some html like so: <div id=avatar_choices> <label for=id_choice_0> <input id=id_choice_0 type=radio
I have a button in my webpage with below code - HTML: <button type="submit"
Assume that I have some HTML page, and a corresponding CSS file. I'd like
I have some code that removes HTML tags from text. I don't care about
I have a small CSS file with contents: <style type=text/css> li { padding: 10px;
I have some html files with their own css. I want to use them
I have this html: <div class=foo parent> <div class=child></div> </div> with some css: .foo{
I have some HTML that looks like this: <ul class=faq> <li class=open> <a class=question

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.